XR · interface

ControllerState

One controller, as much of it as this engine reads.

Explained in XR.

interface ControllerState
import type { ControllerState } from '@driftengine/xr';

Properties

NameTypeDescription
handednessreadonlyHandedness
targetRayModereadonlystringHow the source is aimed: tracked-pointer, gaze or screen.
trackedreadonlybooleanWhether a pose was available this frame. False while a controller is out of view.
gripMatrixreadonlyFloat32Array | nullThe grip transform's matrix, valid only while tracked.
rayMatrixreadonlyFloat32Array | nullWhere the source is aiming, which is not where it is held.
buttonsreadonlyreadonly number[]Analogue values in the profile's order, and zero for a button the device does not have.
pressedreadonlyreadonly boolean[]
axesreadonlyreadonly number[]