From dae27d13117ebcfd51bd4adb2cdf8983054495f1 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Wed, 13 Sep 2023 11:24:05 +0200 Subject: [PATCH] Fix local 3D translation editing --- editor/plugins/node_3d_editor_plugin.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index b2229442e3..ff605da384 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -1460,14 +1460,10 @@ Transform3D Node3DEditorViewport::_compute_transform(TransformMode p_mode, const } if (p_local) { - p_motion = p_original.basis.xform(p_motion); + return p_original_local.translated_local(p_motion); } - // Apply translation - Transform3D t = p_original; - t.origin += p_motion; - - return t; + return p_original.translated(p_motion); } case TRANSFORM_ROTATE: { Transform3D r;