Documentation
    Preparing search index...

    Interface PolylineShape

    An open strip of segments in the XY plane, "2d" only (§24).

    N vertices make N − 1 segments; the outline is not closed. This is §24's shape for a concave or open outline — a terrain silhouette, a wall run, a track — where PolygonShape would have to be convex.

    A polyline is composite: it has no interior, so it cannot be a dynamic body's only shape in any solver that derives mass from geometry, and it is refused as a §30 query shape (see the module header). It is what static level geometry is made of.

    interface PolylineShape {
        type: "polyline";
        vertices: readonly Vector2[];
    }
    Index
    type: "polyline"
    vertices: readonly Vector2[]

    At least two vertices, in order along the strip, with no two consecutive vertices equal. Vertices are in the collider's local frame.