Merge pull request #1184 from sketchyfun/master

Fixes #1160 - Path2D curve handle drag issue
This commit is contained in:
Juan Linietsky 2015-01-11 09:30:52 -03:00
commit 336d9ce5d7

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) {