Taos API Reference
    Preparing search index...

    Interface BodyOptions

    Per-body tuning shared by every shape factory.

    interface BodyOptions {
        dynamic?: boolean;
        motion?: BodyMotion;
        layer?: number;
        mask?: number;
        isSensor?: boolean;
        restitution?: number;
        friction?: number;
        linearVelocity?: Vec3;
        gravityFactor?: number;
        motionQuality?: "discrete" | "linear-cast";
        sensor?: SensorCallbacks;
    }

    Hierarchy (View Summary)

    Index

    Properties

    dynamic?: boolean

    true (default) → dynamic, simulated. false → immovable static body. Ignored when motion is set.

    motion?: BodyMotion

    Motion type. Defaults to dynamic (or static when dynamic: false). kinematic bodies are moved by script (velocity/position) and push dynamics but are not pushed back.

    layer?: number

    Collision layer(s) this body belongs to (bit flags, see CollisionLayer). Default: World for static bodies, Prop for moving bodies.

    mask?: number

    Collision layer(s) this body collides with. Default: All.

    isSensor?: boolean

    When true the body is a sensor (trigger): it reports overlaps via a SensorCallbacks but generates no collision response.

    restitution?: number

    Bounciness 0..1. Default 0.2.

    friction?: number

    Surface friction 0..1. Default Jolt default (~0.2).

    linearVelocity?: Vec3

    Initial linear velocity (world units/sec).

    gravityFactor?: number

    Multiplier on gravity (1 = normal, 0 = floats).

    motionQuality?: "discrete" | "linear-cast"

    Continuous collision detection mode. 'discrete' (default) is the cheap per-step check; 'linear-cast' sweeps the body along its motion each step so a fast body can't tunnel through thin colliders (e.g. one-sided terrain mesh). Use it for small/fast dynamics over thin static geometry.

    Sensor overlap callbacks. Implies isSensor when present.