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

    Class StaticCollider

    A lightweight collision object that avoids the overhead of a full Object3D. Used for inserting static obstacles (like grid walls) into a SpatialHash.

    Implements

    Index
    bounds: BoundingVolume | undefined

    The physical bounding volume of the object.

    collisionLayer: number = 1

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

    collisionMask: number = 0xffffffff

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

    friction: number = 0.5

    Coulomb contact friction coefficient (0.0 = ice, 1.0 = high grip).

    id: number = ...

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

    isPickable: boolean = true
    isTrigger: boolean = false

    If true, this collider acts as a trigger/sensor (fires trigger events without physical force).

    restitution: number = 0.2

    Restitution / bounciness (0.0 = clay, 1.0 = superball).

    • Resets the static collider ID generator (useful for deterministic tests).

      Returns void