You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
aabb change updates bounding box
spatial editor will now update the bounding box if aabb or transform changes
This commit is contained in:
@@ -2405,18 +2405,18 @@ void Node3DEditorViewport::_notification(int p_what) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Transform t = sp->get_global_gizmo_transform();
|
Transform t = sp->get_global_gizmo_transform();
|
||||||
|
VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sp);
|
||||||
|
AABB new_aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp);
|
||||||
|
|
||||||
exist = true;
|
exist = true;
|
||||||
if (se->last_xform == t && !se->last_xform_dirty) {
|
if (se->last_xform == t && se->aabb == new_aabb && !se->last_xform_dirty) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
changed = true;
|
changed = true;
|
||||||
se->last_xform_dirty = false;
|
se->last_xform_dirty = false;
|
||||||
se->last_xform = t;
|
se->last_xform = t;
|
||||||
|
|
||||||
VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sp);
|
se->aabb = new_aabb;
|
||||||
|
|
||||||
se->aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp);
|
|
||||||
|
|
||||||
t.translate(se->aabb.position);
|
t.translate(se->aabb.position);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user