Is there a way to close a CollisionPolygon2D much like how you can close a Line2D? I need this functionality for a procedurally generated collision shape. I want to prevent the player from being able to leave the area enclosed by the CollisionShape2D but there’s a loop hole!
This closes the line but it creates two polygons…
var poly_line := Geometry2D.offset_polyline(
polygon_points.keys(),
5,
Geometry2D.JOIN_SQUARE,
Geometry2D.END_JOINED,
)