diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-04-11 09:54:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 09:54:53 +0200 |
commit | 4cc211a83047e0063a4489eb561c84aee32fa844 (patch) | |
tree | 63e00ca9a6cbab139c75978d019ad80e46c18235 /editor | |
parent | d540875bc0b2c436c2fae1ce410801db074437d9 (diff) | |
parent | c8a40c80054e6dbf2f3403a1db94a820f01e6072 (diff) |
Merge pull request #47787 from timothyqiu/csg-selection
Fix 3D selection box size for Node3D
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 25fb637fb8..3df092bc13 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -3660,9 +3660,9 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, bool p_exclude_top_level_transform) { AABB bounds; - const MeshInstance3D *mesh_instance = Object::cast_to<MeshInstance3D>(p_parent); - if (mesh_instance) { - bounds = mesh_instance->get_aabb(); + const VisualInstance3D *visual_instance = Object::cast_to<VisualInstance3D>(p_parent); + if (visual_instance) { + bounds = visual_instance->get_aabb(); } for (int i = 0; i < p_parent->get_child_count(); i++) { |