Documentation
    Preparing search index...

    Function createRapierColliderDesc

    • Builds the Rapier collider descriptor for a §24 collision shape — the createCollider counterpart of createRapierShape.

      ColliderDesc.convexHull returns null when the point cloud is degenerate. validateCollisionShape already rejects an outline that encloses no area exactly, so this only fires for an outline that is non-degenerate in exact arithmetic and degenerate under Rapier's own epsilon — a real difference of opinion between the two, reported rather than passed on.

      Polyline and chain (PH-22a). Both are ColliderDesc.polyline; the whole difference is the index buffer. An N-vertex polyline gets N − 1 segments (0,1), (1,2), …; an N-vertex chain gets N, the last one (N−1, 0). Indices are always passed explicitly — the upstream "omit for a line strip" default would make the open case implicit and the closed case explicit, and one code path that reads the same for both is worth the extra array.

      Compound. §24 lists it as a 2D shape; Rapier has no compound collider. A compound is several colliders on one body (createCollider called more than once). There is no { type: "compound" } tag to map here.

      Parameters

      Returns ColliderDesc