summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2022-10-19 22:40:02 +0200
committerGitHub <noreply@github.com>2022-10-19 22:40:02 +0200
commitf066f2c0de4451df2b971245d2ceb955705d8527 (patch)
treecb451c9365d75add133bc6cfe6c5b1bf40c2e7d8 /editor
parent23dec5c54f23a8030b48d58fbfd5c836faf9601c (diff)
parent9ebd8c5bb585065d77a8cde6f37098b9badf84df (diff)
Merge pull request #66940 from aaronfranke/doc-get-tr-aabb
Remove the global space `get_transformed_aabb` helper method
Diffstat (limited to 'editor')
-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;