We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aa4561 commit ddd3054Copy full SHA for ddd3054
game_demos/DrawingTurtle.gd
@@ -59,16 +59,11 @@ func move_forward(distance: float) -> void:
59
previous_point = _points[-1]
60
var new_point := previous_point + Vector2.RIGHT.rotated(deg2rad(turn_degrees)) * distance
61
new_point = new_point.snapped(Vector2.ONE)
62
- var is_closed := false
63
- # Consider the polygon closed if a coordinate is repeated.
64
- if new_point in _points:
65
- is_closed = true
66
_points.append(new_point)
+
67
_temp_command_stack.append(
68
{command = "move_to", target = new_point + position + _current_offset}
69
)
70
- if is_closed:
71
- _close_polygon()
72
73
74
func turn_right(angle_degrees: float) -> void:
0 commit comments