diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 5 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.h | 2 |
2 files changed, 4 insertions, 3 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; diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 6ff0fa3afe..7dbe153efd 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -773,7 +773,7 @@ private: WorldEnvironment *preview_environment = nullptr; bool preview_env_dangling = false; Ref<Environment> environment; - Ref<CameraAttributesPhysical> camera_attributes; + Ref<CameraAttributesPractical> camera_attributes; Ref<ProceduralSkyMaterial> sky_material; bool sun_environ_updating = false; |