Taos API Reference
    Preparing search index...

    Class XrControllers

    Tracks the XR session's input sources (controllers, hands) and refreshes their grip / target-ray poses and gamepad button/axis state each frame.

    Deliberately decoupled from rendering: construct one alongside an XrSession and call update once per XRFrame (e.g. from an engine.beforeFrame hook). Read controllers / left / right to drive interaction, locomotion, or held viewmodels. This is the controller half of the WebXR integration — see TODO/webxr-integration.md.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    onConnect: ((c: XrController) => void) | null = null

    Fired when a controller connects.

    onDisconnect: ((c: XrController) => void) | null = null

    Fired when a controller disconnects.

    Accessors

    Methods

    • Refresh every controller's poses and button/axis state for this frame. Call once per XRFrame, before reading controllers.

      Parameters

      • frame: XRFrame

      Returns void