Documentation
    Preparing search index...

    Interface ColliderDocument

    The document COLLIDER_SERIALIZER writes.

    friction, restitution, and density are the authored §24 fields, not the resolved §25 values: absent means "fall back", which is a statement the document has to be able to make. See the module header.

    interface ColliderDocument {
        collisionGroups: number;
        collisionMask: number;
        density?: number;
        friction?: number;
        material?: PhysicsMaterialDocument;
        offset: JsonValue;
        restitution?: number;
        sensor: boolean;
        shape: JsonValue;
    }
    Index
    collisionGroups: number

    §24 bit set of the groups this collider belongs to.

    collisionMask: number

    §24 bit set of the groups it collides with.

    density?: number

    §24 density, present only when the collider authored one.

    friction?: number

    §24 Coulomb friction, present only when the collider authored one.

    §25 shared surface properties, by value, when the collider had one.

    offset: JsonValue

    §24 offset in the body's local frame, as {position, rotation}.

    Always written, unlike the three §25 coefficients below: an absent offset and an identity offset mean exactly the same thing to a solver, so there is no authoring statement for the absence to preserve. A document that omits it — a hand-edited one, or one an older build wrote — restores the identity, which is Collider's own default.

    restitution?: number

    §24 restitution, present only when the collider authored one.

    sensor: boolean

    §24 sensor flag — a sensor reports overlaps and exerts no force.

    shape: JsonValue

    §24 geometry, in serializeCollisionShape's form.