Skip to content

Commit

Permalink
Merge pull request #90098 from viksl/fix-instant-rotation-and-return-…
Browse files Browse the repository at this point in the history
…wrapping

Allow wrapping for begin rotate transformation to bring it in line with Blender.
  • Loading branch information
akien-mga committed Jun 17, 2024
2 parents 9dca899 + df71600 commit bb8fe43
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1639,11 +1639,7 @@ void Node3DEditorViewport::input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> m = p_event;

if (m.is_valid()) {
if (_edit.mode == TRANSFORM_ROTATE) {
_edit.mouse_pos = m->get_position(); // rotate should not wrap
} else {
_edit.mouse_pos += _get_warped_mouse_motion(p_event);
}
_edit.mouse_pos += _get_warped_mouse_motion(p_event);
update_transform(_get_key_modifier(m) == Key::SHIFT);
}
}
Expand Down

0 comments on commit bb8fe43

Please sign in to comment.