Skip to content

Commit

Permalink
Fix local 3D translation editing
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Sep 16, 2023
1 parent 5f1e56f commit dae27d1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dae27d1

Please sign in to comment.