New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows MR controller identifies as 'generic-trigger' controller in XR #7375
Comments
Hey, can I ask what browser you are using? And what device as well? Older browsers don't support the method used to identify the controllers (profiles). Have you tried with latest canary? I can add a fallback, but some browsers have already removed the ID from the gamepad object and don't support profiles, which makes it very hard to guess the device used |
Yeah, I was using EdgeDev 80.0.361.5. My device is an HP Windows Mixed Reality headset. I have not tried with latest canary Chrome/Edge. Are you saying that all browsers are eventually removing the ID from the gamepad object? If that's the case, what's the future plan for making sure the correct controller model/input mapping is used? |
The future plan is a profiles array on the input device, which will map to the abilities of your device. You can read about it here: |
I'll check this next Monday. I think a temporary solution would be to allow the dev to (optionally) force a type of controller as the default one instead of the genetic controller. I'll add it to the input options |
Did something in the XR spec change? It seems like this used to work before your recent refactoring of the XR controller-related classes. |
Nope, it didn't change, but it was simply not implemented and the default controller was the MR controller (this is why the Oculus controllers didn't load correctly). I added the generic controller as the last fallback and this is what caused this. |
I added an optional way of forcing a certain controller type (see the PR for usage example), I will work further on a better way to address this . |
@RaananW When you say that the latest canary works correctly, are you referring to Chrome Canary? I just tried the above playground on Chrome Canary and it was still broken. Also, question about your fix: does the |
@nbduke - the menu button was removed from the specs in the latest so it throws exceptions and doesnt work, I will push a fix in a sec. |
@nbduke - the forceInputProfile for older browsers will force those controllers (overriding the profile array). if they are not found, the profile array will be used. |
So I would need a runtime check to determine whether I should use Or maybe I'm not understanding what it does. |
I have just tested the latest PR locally with canary and it works including thumbstick animations. If you have any problems, please let me know. Shortly after merging it will also be available in the playground. |
about the force fallback - this is just a temporary solution until all browsers support the full profiles spec. But this assumes the profiles array is populated. if it isn't (probably the case of older browsers) and the gamepad id is not available, you can force a certain type of controller so you can develop. |
Is there a way to check if the profiles array is populated? |
only when the controllers are connected and you are in webxr already. You can either check right after entering XR (xrSessionManager.session.inputSources will give you an array of connected XRInputSource along with their profile arrays) or you can attach to the xrInput.onControllerAddedObservable. If you add the callback first (a flag when using the Wait for the latest change, i also added a fallback between microsoft-mixed-reality and windows-mixed-reality , edge might have the latter. |
I can confirm this fixes the issues I was seeing on both Chrome Canary and Edge 80.0.361.23. Thanks! |
Bugs
Repro playground: https://playground.babylonjs.com/#AM07G2#46
When using a Windows MR headset, the controller model is incorrect and not all inputs are mapped. In the above playground, I print the profile ID of the controller; for me, it always shows up as "generic-trigger".
The text was updated successfully, but these errors were encountered: