浏览代码

Fixes #1160

Fixed curve handles not taking current zoom level into consideration
when being dragged
BenH 10 年之前
父节点
当前提交
fc4d6765f1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tools/editor/plugins/path_2d_editor_plugin.cpp

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