diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-23 08:10:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-23 08:10:53 +0200 |
commit | 78d9936f8d63754a1480f99ad14a5eee642380a9 (patch) | |
tree | 0461a0ebe1a5cb32bb549ce383b5908b9d31a389 /editor | |
parent | 1e55899dfe17d2f4908b66869ca9757b13e91ee9 (diff) | |
parent | d9d9571c8ca1f0be9c1bfe58cddde3d249e627df (diff) |
Merge pull request #10573 from tagcup/gizmo_aabb_scaling_order
Fix the order of transformations for selection bounding box in spatial editor.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index bca1f254b0..1d25f9e56b 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -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) |