VR-Controller-Input

I know for normal Controlls there is this.context.input. but the documentation only says XR Controlls are handled seperate, how do I acces for example the Triggerbutton
(i am new to both Unity and WebXR so in simple terms pls)

Original Post on Discord

by user 253912725917401089

Currently you can get access to all XR controllers via the WebXR component. So get a reference to that and it an array of all WebXRControllers and properties for left and right controller (LeftController for example). You can then access the XRInputSource on that

For example you might want to look at the code at @needle-tools/engine/engine_components/WebXRController.ts around line 443 / 445

This will in a future version be easier to access via the input class but for now that’s the way to go :slightly_smiling_face:

thank you for responding so quickly

by user 253912725917401089