XR · function

buttonPressed

Whether a named button is pressed, false where the device has no such button.

Explained in XR.

function buttonPressed(state: ControllerState, button: XrButton): boolean
import { buttonPressed } from '@driftengine/xr';

Parameters

ParameterTypeDescription
stateControllerState
buttonXrButton