Merge pull request #10573 from tagcup/gizmo_aabb_scaling_order
Fix the order of transformations for selection bounding box in spatial editor.
This commit is contained in:
commit
78d9936f8d
1 changed files with 5 additions and 1 deletions
|
@ -1756,7 +1756,11 @@ void SpatialEditorViewport::_notification(int p_what) {
|
||||||
|
|
||||||
Transform t = sp->get_global_transform();
|
Transform t = sp->get_global_transform();
|
||||||
t.translate(se->aabb.position);
|
t.translate(se->aabb.position);
|
||||||
t.basis.scale(se->aabb.size);
|
|
||||||
|
// apply AABB scaling before item's global transform
|
||||||
|
Basis aabb_s;
|
||||||
|
aabb_s.scale(se->aabb.size);
|
||||||
|
t.basis = t.basis * aabb_s;
|
||||||
|
|
||||||
exist = true;
|
exist = true;
|
||||||
if (se->last_xform == t)
|
if (se->last_xform == t)
|
||||||
|
|
Loading…
Reference in a new issue