summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-15 08:01:20 +0200
committerGitHub <noreply@github.com>2021-09-15 08:01:20 +0200
commit5139f18be4a6762fd6f083051dc9d112e5df9c04 (patch)
tree2df3071b52813ef3f34437e06c101338dabd5edc
parentf9c6dc1d9d56b0330d8c5fab28cc91196fca238e (diff)
parent44aa26ad665bf95a78780837c7b0140c7edd8dd9 (diff)
Merge pull request #52685 from lentsius-bark/node3d-scaling-fix
Fix scale sensitivity for 3D objects
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 291cafab2b..be5d756444 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -1831,6 +1831,8 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
motion = Vector3(scale, scale, scale);
}
+ motion /= click.distance_to(_edit.center);
+
// Disable local transformation for TRANSFORM_VIEW
bool local_coords = (spatial_editor->are_local_coords_enabled() && _edit.plane != TRANSFORM_VIEW);