Taos API Reference
    Preparing search index...

    Interface CharacterOptions

    interface CharacterOptions {
        radius?: number;
        halfHeight?: number;
        position?: Vec3;
        layer?: number;
        mask?: number;
        maxSlopeAngle?: number;
        gravity?: number;
        mass?: number;
        innerBody?: boolean;
    }
    Index

    Properties

    radius?: number

    Capsule radius (world units). Default 0.3.

    halfHeight?: number

    Half-length of the capsule's cylindrical section (excludes the caps). Total height = 2 * (halfHeight + radius). Default 0.6 (→ ~1.8 tall).

    position?: Vec3

    Spawn position (feet-relative center is the capsule center). Default origin.

    layer?: number

    Collision layer this character belongs to. Default CollisionLayer.Player.

    mask?: number

    Collision layers it collides with. Default All. (Jolt's pair filter is symmetric, so a body is only detected by a sensor/trigger when its mask includes that sensor's layer — keeping the default All lets trigger zones detect the character. Solid response is still governed by the other body's mask, so e.g. a bullet whose mask is World still passes through.)

    maxSlopeAngle?: number

    Steepest walkable slope, in radians. Default 50°.

    gravity?: number

    Downward acceleration applied each move. Default 9.81 m/s².

    mass?: number

    Mass (kg) used when pushing dynamic bodies. Default 80.

    innerBody?: boolean

    When true (default) the character also creates an inner kinematic rigid body matching the capsule, so raycasts and other bodies can hit it (needed for the player/enemy to be shootable). Set false for a purely query-driven actor.