You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Merge pull request #39824 from mrushyendra/snap_point_polygon
Fix possible accidental duplication of Polygon2D start point
This commit is contained in:
@@ -369,7 +369,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||||||
} else {
|
} else {
|
||||||
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
|
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
|
||||||
|
|
||||||
if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
|
if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(xform.xform(cpoint)) < grab_threshold) {
|
||||||
//wip closed
|
//wip closed
|
||||||
_wip_close();
|
_wip_close();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user