summaryrefslogtreecommitdiffstats
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-10-05 11:09:54 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-10-18 07:30:31 -0500
commit9ebd8c5bb585065d77a8cde6f37098b9badf84df (patch)
tree2543f29778b92fe600b60ecbf865c38eeb20a2f8 /editor/plugins/node_3d_editor_plugin.cpp
parent2e3662acbd8586697db38569785cc9f97dff945e (diff)
downloadredot-engine-9ebd8c5bb585065d77a8cde6f37098b9badf84df.tar.gz
Remove the global space `get_transformed_aabb` helper method
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 421e8debed..e5d4b262aa 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6991,9 +6991,10 @@ void Node3DEditor::_snap_selected_nodes_to_floor() {
}
}
if (!found_valid_shape && vi.size()) {
- AABB aabb = (*vi.begin())->get_transformed_aabb();
+ VisualInstance3D *begin = *vi.begin();
+ AABB aabb = begin->get_global_transform().xform(begin->get_aabb());
for (const VisualInstance3D *I : vi) {
- aabb.merge_with(I->get_transformed_aabb());
+ aabb.merge_with(I->get_global_transform().xform(I->get_aabb()));
}
Vector3 size = aabb.size * Vector3(0.5, 0.0, 0.5);
from = aabb.position + size;