Small World Engine API Reference - v0.78.00
    Preparing search index...

    Interface Collidable

    Interface for objects that can be tested for physical collisions. Decouples collision detection from the heavy Object3D class.

    interface Collidable {
        bounds: BoundingVolume | undefined;
        collisionLayer?: number;
        collisionMask?: number;
        id?: number;
        isTrigger?: boolean;
    }

    Implemented by

    Index
    bounds: BoundingVolume | undefined

    The physical bounding volume of the object.

    collisionLayer?: number

    32-bit collision layer bitmask this collider belongs to (default: 1).

    collisionMask?: number

    32-bit collision mask specifying which layers this collider interacts with (default: 0xFFFFFFFF).

    id?: number

    Optional integer identifier for deterministic physics solver sorting and netcode lockstep.

    isTrigger?: boolean

    If true, the collider acts as a sensor/trigger (detects overlap and fires events without physical force).