Merge pull request #3799 from volzhs/rotation_reset
keep previous rotation when using rotate tool. fixes #3788.
This commit is contained in:
commit
75d888c10e
|
@ -1560,7 +1560,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
||||||
Matrix32 rot;
|
Matrix32 rot;
|
||||||
rot.elements[1] = (dfrom - center).normalized();
|
rot.elements[1] = (dfrom - center).normalized();
|
||||||
rot.elements[0] = rot.elements[1].tangent();
|
rot.elements[0] = rot.elements[1].tangent();
|
||||||
node->set_rot(snap_angle(rot.xform_inv(dto-center).angle(), node->get_rot()));
|
node->set_rot(snap_angle(rot.xform_inv(dto-center).angle() + node->get_rot(), node->get_rot()));
|
||||||
display_rotate_to = dto;
|
display_rotate_to = dto;
|
||||||
display_rotate_from = center;
|
display_rotate_from = center;
|
||||||
viewport->update();
|
viewport->update();
|
||||||
|
|
Loading…
Reference in New Issue