summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenH <sketchyfun@gmail.com>2015-01-11 12:18:10 +0000
committerBenH <sketchyfun@gmail.com>2015-01-11 12:18:10 +0000
commitfc4d6765f15b6d17bceb5a045ae075fa515d862b (patch)
tree40e51daa5e8f5cf6a9fbb8c63b8e8a8bd30d608b
parentd30f4e52f654a26e14223a6ef9a946cc6282c0db (diff)
Fixes #1160
Fixed curve handles not taking current zoom level into consideration when being dragged
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp4
1 files 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 33ea5f3588..49239343a5 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<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) {
case ACTION_MOVING_POINT: {
@@ -439,7 +439,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
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) {