Skip to content

Use WebXR session.inputSources[i].gamepad #4322

@klausw

Description

@klausw

WebXR now sends the state of controller buttons and axes as a gamepad attribute for each XR input source:

https://immersive-web.github.io/webxr-gamepads-module/#xrinputsource-interface

Using Gamepad API separately via navigator.getGamepads() or similar is deprecated:

https://immersive-web.github.io/webxr-gamepads-module/#navigator-differences

However, Gamepad instances returned by an XRInputSource's gamepad attribute MUST NOT be included in the array returned by navigator.getGamepads().

AFrame should be updated to use session.inputSources[i].gamepad accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions