Fix axis snapping of CollisionPolygon2d's newly created vertex

This commit is contained in:
Grzegorz Puławski 2022-08-07 15:10:28 +02:00
parent 428aed8e87
commit ba58491ca7

View file

@ -294,9 +294,9 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
_commit_action();
return true;
} else {
pre_move_edit = vertices;
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
vertices.insert(edited_point.vertex, edited_point.pos);
pre_move_edit = vertices;
selected_point = Vertex(edited_point.polygon, edited_point.vertex);
edge_point = PosVertex();