mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix points jumping when dragging starts in the Polygon2D editor
This commit is contained in:
parent
88b9932ce1
commit
8098581079
1 changed files with 2 additions and 3 deletions
|
|
@ -629,9 +629,8 @@ void Polygon2DEditor::_canvas_input(const Ref<InputEvent> &p_input) {
|
|||
if (current_action == ACTION_EDIT_POINT) {
|
||||
point_drag_index = -1;
|
||||
for (int i = 0; i < editing_points.size(); i++) {
|
||||
Vector2 tuv = mtx.xform(editing_points[i]);
|
||||
if (tuv.distance_to(mb->get_position()) < 8) {
|
||||
drag_from = tuv;
|
||||
if (mtx.xform(editing_points[i]).distance_to(mb->get_position()) < 8) {
|
||||
drag_from = mb->get_position();
|
||||
point_drag_index = i;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue