Merge pull request #32540 from codecustard/fix_show_bounds_for_scenes

Fixes scene instances not displaying bounds when selected
This commit is contained in:
Rémi Verschelde 2019-10-04 12:19:33 +02:00 committed by GitHub
commit 3b2033b941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2172,7 +2172,7 @@ void SpatialEditorViewport::_notification(int p_what) {
VisualInstance *vi = Object::cast_to<VisualInstance>(sp);
se->aabb = vi ? vi->get_aabb() : AABB(Vector3(-0.2, -0.2, -0.2), Vector3(0.4, 0.4, 0.4));
se->aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp, AABB(Vector3(-0.2, -0.2, -0.2), Vector3(0.4, 0.4, 0.4)));
Transform t = sp->get_global_gizmo_transform();
t.translate(se->aabb.position);