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:
Rémi Verschelde 2017-08-23 08:10:53 +02:00 committed by GitHub
commit 78d9936f8d

View file

@ -1756,7 +1756,11 @@ void SpatialEditorViewport::_notification(int p_what) {
Transform t = sp->get_global_transform();
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;
if (se->last_xform == t)