From 5e2450cae6783afa92061cd79f30cb7158f8c4ac Mon Sep 17 00:00:00 2001 From: Krystof Klestil Date: Tue, 14 Sep 2021 22:31:38 +0200 Subject: [PATCH] Fix issues with scaling 3D Objects When scaling 3D objects the distance form them is not considered. Allowing for finer contorl. Overscaled objects no longer break the gizmo. --- editor/plugins/spatial_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 68ca11112546..543ac857be64 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1612,6 +1612,8 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { motion = Vector3(scale, scale, scale); } + motion /= click.distance_to(_edit.center); + List &selection = editor_selection->get_selected_node_list(); // Disable local transformation for TRANSFORM_VIEW