Taos API Reference
    Preparing search index...

    Variable CollisionLayerConst

    CollisionLayer: {
        World: number;
        Player: number;
        Enemy: number;
        Bullet: number;
        Prop: number;
        Trigger: number;
        All: 65535;
    } = ...

    Named collision layers as bit flags (Godot-style). A body's layer says which layer(s) it belongs to; its mask says which layers it collides with. Two bodies interact only when each one's layer appears in the other's mask (an AND of both directions, matching Jolt's ObjectLayerPairFilterMask). Give "passively collidable" bodies (static world, the player capsule) mask: All and put the selective filtering on the active body (e.g. a bullet that should hit only World | Enemy).

    World is the static-geometry partition and is mapped to the non-moving broad-phase layer for efficiency; every other bit maps to the moving layer. (Broad-phase mapping is only a performance hint — putting a static sensor on a "moving" layer is correct, just slightly less optimal.) Up to 16 layers fit in the group field.

    Type Declaration

    • ReadonlyWorld: number

      Static level geometry (mesh/height-field/static boxes). Non-moving.

    • ReadonlyPlayer: number

      Player characters.

    • ReadonlyEnemy: number

      Enemy characters.

    • ReadonlyBullet: number

      Projectiles.

    • ReadonlyProp: number

      Dynamic debris / physics props (the default for dynamic bodies).

    • ReadonlyTrigger: number

      Sensor/trigger volumes (doors, detection zones, reverb areas).

    • ReadonlyAll: 65535

      Collides with everything.