Fixed curve handles not taking current zoom level into consideration
when being dragged
This commit is contained in:
BenH 2015-01-11 12:18:10 +00:00
parent d30f4e52f6
commit fc4d6765f1

View file

@ -195,7 +195,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
Ref<Curve2D> curve = node->get_curve(); Ref<Curve2D> curve = node->get_curve();
Vector2 new_pos = moving_from + xform.basis_xform( gpoint - moving_screen_from ); Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch(action) { switch(action) {
case ACTION_MOVING_POINT: { case ACTION_MOVING_POINT: {
@ -439,7 +439,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
Ref<Curve2D> curve = node->get_curve(); Ref<Curve2D> curve = node->get_curve();
Vector2 new_pos = moving_from + xform.basis_xform( gpoint - moving_screen_from ); Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch(action) { switch(action) {