mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 06:03:38 +00:00
Merge pull request #23224 from capnm/fix-Align-selection-with-view-in-orthogonal-mode
Fix 'Align selection with view' in orthogonal mode
This commit is contained in:
commit
b77a411258
@ -2535,8 +2535,14 @@ void SpatialEditorViewport::_menu_option(int p_option) {
|
||||
if (!se)
|
||||
continue;
|
||||
|
||||
Transform xform = camera_transform;
|
||||
xform.scale_basis(sp->get_scale());
|
||||
Transform xform;
|
||||
if (orthogonal) {
|
||||
xform = sp->get_global_transform();
|
||||
xform.basis.set_euler(camera_transform.basis.get_euler());
|
||||
} else {
|
||||
xform = camera_transform;
|
||||
xform.scale_basis(sp->get_scale());
|
||||
}
|
||||
|
||||
undo_redo->add_do_method(sp, "set_global_transform", xform);
|
||||
undo_redo->add_undo_method(sp, "set_global_transform", sp->get_global_gizmo_transform());
|
||||
|
Loading…
Reference in New Issue
Block a user