Browse Source

Merge pull request #52685 from lentsius-bark/node3d-scaling-fix

Fix scale sensitivity for 3D objects
Rémi Verschelde 4 years ago
parent
commit
5139f18be4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      editor/plugins/node_3d_editor_plugin.cpp

+ 2 - 0
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);