diff options
author | cel 🌸 <cel@blos.sm> | 2023-07-09 14:02:37 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-07-09 14:02:37 +0100 |
commit | ae7b7226c64e7b9ce62e045991c315040563fe5a (patch) | |
tree | abca4450641dee1a63150d45eeaf4fb3b6fb7676 /Scripts/drawing.gd | |
parent | f1677fac1f7c7989a28d078498357c88f9f631f3 (diff) | |
download | 2023-ae7b7226c64e7b9ce62e045991c315040563fe5a.tar.gz 2023-ae7b7226c64e7b9ce62e045991c315040563fe5a.tar.bz2 2023-ae7b7226c64e7b9ce62e045991c315040563fe5a.zip |
road simplification via Ramer–Douglas–Peucker
Diffstat (limited to 'Scripts/drawing.gd')
-rw-r--r-- | Scripts/drawing.gd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Scripts/drawing.gd b/Scripts/drawing.gd index 61896f9..c45196b 100644 --- a/Scripts/drawing.gd +++ b/Scripts/drawing.gd @@ -2,7 +2,7 @@ extends Node var drawing = false -@onready var line: Line2D = $TrackLine +@onready var line = $Road @onready var path: Path2D = $TrackPath func _ready(): @@ -16,6 +16,7 @@ func start_drawing(): func _end_drawing(): drawing = false + line.simplify() owner.set_driving(true) |