WebXR-emulator-extension icon indicating copy to clipboard operation
WebXR-emulator-extension copied to clipboard

Wrong gamepad button configuration for Oculus Touch.

Open takahirox opened this issue 4 years ago • 5 comments

Bug report from @checksummaster in https://github.com/MozillaReality/WebXR-emulator-extension/issues/31#issuecomment-619264598

About button, with oculus touch, I should change some code like that (not so sure why then I don't make a pull request for this) const BUTTON = { SELECT: 1, SQUEEZE: 2 }; before it was 0,1 but 0 is the thump (on the joystick)

takahirox avatar Apr 25 '20 00:04 takahirox

this is from aframe

/**

  • Button indices:
  • 0 - thumbstick (which has separate axismove / thumbstickmoved events)
  • 1 - trigger (with analog value, which goes up to 1)
  • 2 - grip (with analog value, which goes up to 1)
  • 3 - X (left) or A (right)
  • 4 - Y (left) or B (right)
  • 5 - surface (touch only) */ var INPUT_MAPPING_WEBVR = { left: { axes: {thumbstick: [0, 1]}, buttons: ['thumbstick', 'trigger', 'grip', 'xbutton', 'ybutton', 'surface'] }, right: { axes: {thumbstick: [0, 1]}, buttons: ['thumbstick', 'trigger', 'grip', 'abutton', 'bbutton', 'surface'] } };

checksummaster avatar Apr 27 '20 16:04 checksummaster

Here is different mapping https://immersive-web.github.io/webxr-gamepads-module/#xr-standard-gamepad-mapping index 0 -> Primary trigger, 1 -> Primary squeeze button, 2 -> Primary touchpad, 3 -> Primary thumbstick

And for axes [0, 1] -> Primary touchpad X, Y [2, 3] -> Primary thumbstick X, Y

jendaz avatar May 22 '20 08:05 jendaz

I also checked it right now on my Oculus Go in an example for controller state and when I press the trigger the first button is pressed: 98031539_10216863943058657_7380806409463529472_o But when I pres select button in WebXR extension in Chrome the third button is selected. Snímek obrazovky 2020-05-22 v 10 02 12 Snímek obrazovky 2020-05-22 v 10 02 45

I'm also praying for support of all buttons and axes from the extension.

jendaz avatar May 22 '20 08:05 jendaz

Thanks for the report and investigation. I'd like to try to resolve in the next release v0.4.0. Also PR is welcome!

takahirox avatar May 22 '20 16:05 takahirox

It fixed in this fork. https://github.com/illusioneering/WebXR-emulator-extension (this fork don't have the last modification and not work with aframe 1.2) This fork also supports more buttons for the quest.

I'm not the one that makes this fork but maybe a pull request should be appropriate.

checksummaster avatar Feb 17 '21 20:02 checksummaster