mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Add Get Center Method for Rect2/Rect2i and AABB.
This commit is contained in:
parent
87de2e7c4a
commit
90908cd67d
33 changed files with 133 additions and 56 deletions
|
|
@ -80,7 +80,7 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
|
|||
_update_rotation();
|
||||
|
||||
AABB aabb = mesh->get_aabb();
|
||||
Vector3 ofs = aabb.position + aabb.size * 0.5;
|
||||
Vector3 ofs = aabb.get_center();
|
||||
float m = aabb.get_longest_axis_size();
|
||||
if (m != 0) {
|
||||
m = 1.0 / m;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue