Git Product home page Git Product logo

Comments (8)

felixtrz avatar felixtrz commented on August 30, 2024 1

This should now be fixed, you can get the fix now by building from source, or you can wait til next week when we push an update. Thanks again for flagging this!

from immersive-web-emulator.

felixtrz avatar felixtrz commented on August 30, 2024

According to the WebXR Gamepad API spec: https://www.w3.org/TR/webxr-gamepads-module-1/#example-mappings,
gamepad.axes[0] and gamepad.axes[1] are supposed to be the x and y value of touch pad on controllers, quest devices do not have a touch pad, so the value being null or undefined is expected.

If you are looking for the joystick x and y value, they are gamepad.axes[2] and gamepad.axes[3]

from immersive-web-emulator.

felixtrz avatar felixtrz commented on August 30, 2024

Also, according to the spec: https://www.w3.org/TR/webxr-gamepads-module-1/#xr-standard-heading, none of the axes values are required.
Screenshot 2023-02-16 at 3 39 25 PM

from immersive-web-emulator.

felixtrz avatar felixtrz commented on August 30, 2024

@andreasplesch I am closing this issue now, feel free to reopen this if my comments did not fully address your concerns.

from immersive-web-emulator.

andreasplesch avatar andreasplesch commented on August 30, 2024

Thanks. But I think you may have missed

https://www.w3.org/TR/webxr-gamepads-module-1/#xr-standard-heading

Devices that lack one of the optional inputs listed in the tables above MUST preserve their place in the buttons or axes array, reporting a placeholder button or placeholder axis, respectively. A placeholder button MUST report 0 for value, false for pressed, and false for touched. A placeholder axis MUST report 0.

So instead of null or undefined the placeholder value must be 0.

This is to make it compatible with

https://w3c.github.io/gamepad/#dom-gamepad-axes

which states:

All axis values MUST be linearly normalized to the range [-1.0 .. 1.0].

as well as https://www.w3.org/TR/gamepad/#dfn-axes

A [sequence](https://webidl.spec.whatwg.org/#idl-sequence) of [double](https://webidl.spec.whatwg.org/#idl-double) values representing the current state of axes exposed by this device

from immersive-web-emulator.

andreasplesch avatar andreasplesch commented on August 30, 2024

Unfortunately I cannot reopen the issue. Please let me know if I should file a new issue.

from immersive-web-emulator.

felixtrz avatar felixtrz commented on August 30, 2024

Oops! You got me there. I will put up a fix soon!

from immersive-web-emulator.

andreasplesch avatar andreasplesch commented on August 30, 2024

Glad to help !

from immersive-web-emulator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.