Taos API Reference
    Preparing search index...

    Interface XrController

    Per-frame snapshot of one tracked XR input source (controller / hand).

    interface XrController {
        handedness: XRHandedness;
        targetRayMode: XRTargetRayMode;
        profiles: readonly string[];
        gripMatrix: Mat4 | null;
        rayMatrix: Mat4 | null;
        buttons: boolean[];
        buttonValues: number[];
        axes: number[];
        source: XRInputSource;
    }
    Index

    Properties

    handedness: XRHandedness
    targetRayMode: XRTargetRayMode
    profiles: readonly string[]
    gripMatrix: Mat4 | null

    Grip pose (where a held object sits) in reference space, or null when untracked this frame. Maps grip-space → world(reference) space.

    rayMatrix: Mat4 | null

    Target-ray pose (the pointing ray) in reference space, or null when untracked. -Z of this matrix is the ray direction.

    buttons: boolean[]

    Button pressed flags (gamepad mapping), index by controller profile.

    buttonValues: number[]

    Button analog values [0,1].

    axes: number[]

    Axis values [-1,1] (thumbstick/trackpad), typically [x0,y0,x1,y1].

    source: XRInputSource

    The underlying source (stable across frames while connected).