From fc4d6765f15b6d17bceb5a045ae075fa515d862b Mon Sep 17 00:00:00 2001 From: BenH Date: Sun, 11 Jan 2015 12:18:10 +0000 Subject: [PATCH] Fixes #1160 Fixed curve handles not taking current zoom level into consideration when being dragged --- tools/editor/plugins/path_2d_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp index 33ea5f35881..49239343a5b 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.cpp +++ b/tools/editor/plugins/path_2d_editor_plugin.cpp @@ -195,7 +195,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) { Ref 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) { case ACTION_MOVING_POINT: { @@ -439,7 +439,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) { Ref 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) {