Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
future_forest's avatar
3 years ago
Solved

Update to Oculus Browser broke controller button input

It looks like a recent update to the Oculus Browser may have broken getting input for the A and B buttons with WebXR/THREE.js. Has anyone seen a similar issue or can confirm? I tested on Both a Quest 2 and a Quest Pro and both reproduce the issue.

Here's some example code which used to work:
https://github.com/fbriggs/lifecast_public/blob/main/web/lifecast_res/LifecastVideoPlayer8.js#L571

The most important parts of the code are:

renderer = new THREE.WebGLRenderer({
antialias: false,
powerPreference: "high-performance",
depth: true
});
...
vr_controller0 = renderer.xr.getController(0);
vr_controller1 = renderer.xr.getController(1);
...
vr_controller.button_A = vr_controller.gamepad.buttons[4].value > 0;
vr_controller.button_B = vr_controller.gamepad.buttons[5].value > 0;

4 Replies