aframe icon indicating copy to clipboard operation
aframe copied to clipboard

Buttons and axes incorrectly mapped in windows-motion-controls

Open broehl opened this issue 5 years ago • 4 comments

Description:

  • A-Frame Version: 1.0.4
  • Platform / Device: Firefox / Windows MR

In the WebVR mapping (which is what's currently being used with Firefox), controller button id zero is incorrectly given as "thumbstick" when it should be "trackpad".

The trackpad x, y position is also incorrectly mapped to the thumbstick position, so the trackpad acts like a thumbstick and the thumbstick itself is inoperative.

broehl avatar Jul 28 '20 01:07 broehl

I don’t have a Windows MR device to test on. PRs are welcome

dmarcos avatar Jul 28 '20 10:07 dmarcos

Here's an update, with sample code...

The sample code works as expected on the Vive (pressing the trackpad generates a trackpaddown event, and moving the trackpad generates trackpadmoved events).

It also works fine on the Rift (pressing the thumbstick generates a thumbstickdown event, and moving the thumbstick generates thumbstickmoved events).

On Windows MR, the behavior is incorrect. Pressing the trackpad generates a thumbstickdown event, movement of the thumbstick is completely ignored, and moving the touchpad (even without pressing it) generates both trackpadmoved and thumbstickmoved events. [note that the thumbstick press should not be used, since Windows MR uses that to open the Steam menu]

The problem is definitely in windows-motion-controls, since the low-level events from tracked-controls are correct (buttons are reported with the correct id numbers and axis motion is reported correctly).

Test.zip .

broehl avatar Jul 28 '20 14:07 broehl

Thanks. If you can open a pull request with the necessary changes it will be super appreciated.

dmarcos avatar Jul 28 '20 17:07 dmarcos

One of the issue described here was fixed in #5732 I believe on aframe > 1.7.1

vincentfretin avatar Jul 06 '25 09:07 vincentfretin