API

Interface XrButtonState

State of a single controller button/trigger for the current frame.

interface XrButtonState {
    pressed: boolean;
    touched: boolean;
    value: number;
}
Index
pressed: boolean

True while the button is fully pressed.

touched: boolean

True while the button is touched (capacitive), if the hardware reports it.

value: number

Analog value in [0, 1] (1 for digital buttons when pressed).