diff options
author | cel 🌸 <cel@blos.sm> | 2023-07-09 16:30:40 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-07-09 16:30:40 +0100 |
commit | fd37d1030f79705fc7a2498bcd356ebc86462544 (patch) | |
tree | 2bb3212f8ea9864b6c7fd43dc36499d1c3757db7 /Scripts/drawing.gd | |
parent | 12c65d9ed4447a60b26b952fdfc397f45be2ca72 (diff) | |
parent | b384856adeed758ce3fe395f6b973639f21fc4d8 (diff) | |
download | 2023-fd37d1030f79705fc7a2498bcd356ebc86462544.tar.gz 2023-fd37d1030f79705fc7a2498bcd356ebc86462544.tar.bz2 2023-fd37d1030f79705fc7a2498bcd356ebc86462544.zip |
merge branch 'curve-smoothing'
Diffstat (limited to '')
-rw-r--r-- | Scripts/drawing.gd | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Scripts/drawing.gd b/Scripts/drawing.gd index 832c42d..6b94f6e 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,10 @@ func start_drawing(): func _end_drawing(): drawing = false + line.simplify() + line.draw_borders() + for point in line.points: + path.curve.add_point(point) owner.set_driving(true) |