• Godot Help
  • How to align CSG Polygon with Path or Curve3D?

How to align CSG Polygon so Path points were in the middle of the polygon and not always on the left side?
Green - Curve3D points.

my goal is to build a nice simmetrical path so i have to align polygon to points rather curve itself. i guess i should find some algorhitm and build intentionally wrong curve. but i can imagine objects which will follow the path will have wrong trajectory too which i dont want. i wish there was a checkmark in editor for that.

  • Solution:

    $CSGPolygon.polygon = PoolVector2Array([
        Vector2(-width/2, 0),
        Vector2(-width/2, height),
        Vector2(width/2, height),
        Vector2(width/2, 0),
    ])

    and video

Solution:

$CSGPolygon.polygon = PoolVector2Array([
    Vector2(-width/2, 0),
    Vector2(-width/2, height),
    Vector2(width/2, height),
    Vector2(width/2, 0),
])

and video