Skip to content

Commit

Permalink
Merge pull request #81609 from AThousandShips/gizmo_fix
Browse files Browse the repository at this point in the history
Fix local 3D translation editing
  • Loading branch information
akien-mga committed Sep 16, 2023
2 parents 6c1be30 + dae27d1 commit 91dee34
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 91dee34

Please sign in to comment.