Skip to content

Commit 8098581

Browse files
committed
Fix points jumping when dragging starts in the Polygon2D editor
1 parent 88b9932 commit 8098581

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

editor/plugins/polygon_2d_editor_plugin.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,8 @@ void Polygon2DEditor::_canvas_input(const Ref<InputEvent> &p_input) {
629629
if (current_action == ACTION_EDIT_POINT) {
630630
point_drag_index = -1;
631631
for (int i = 0; i < editing_points.size(); i++) {
632-
Vector2 tuv = mtx.xform(editing_points[i]);
633-
if (tuv.distance_to(mb->get_position()) < 8) {
634-
drag_from = tuv;
632+
if (mtx.xform(editing_points[i]).distance_to(mb->get_position()) < 8) {
633+
drag_from = mb->get_position();
635634
point_drag_index = i;
636635
}
637636
}

0 commit comments

Comments
 (0)