Fix 3D selection box size for Spatial
This commit is contained in:
parent
7a9c14e276
commit
bfa5adb84f
1 changed files with 3 additions and 3 deletions
|
@ -3560,9 +3560,9 @@ Vector3 SpatialEditorViewport::_get_instance_position(const Point2 &p_pos) const
|
|||
AABB SpatialEditorViewport::_calculate_spatial_bounds(const Spatial *p_parent, bool p_exclude_toplevel_transform) {
|
||||
AABB bounds;
|
||||
|
||||
const MeshInstance *mesh_instance = Object::cast_to<MeshInstance>(p_parent);
|
||||
if (mesh_instance) {
|
||||
bounds = mesh_instance->get_aabb();
|
||||
const VisualInstance *visual_instance = Object::cast_to<VisualInstance>(p_parent);
|
||||
if (visual_instance) {
|
||||
bounds = visual_instance->get_aabb();
|
||||
}
|
||||
|
||||
for (int i = 0; i < p_parent->get_child_count(); i++) {
|
||||
|
|
Loading…
Reference in a new issue