useXRControllerButtonEvent
useXRControllerButtonEvent(
controller
,id
,onChange
):void
Hook for subscribing to a button state change event on the controller
Parameters
controllerthe controller to listen for the event
undefined
| XRControllerState
XRControllerGamepadComponentId
of the button
onChange(state
) => void
callback that gets executed when the state of the button changes
Returns
void