-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add suppport for Meta Quest Touch Pro controllers (fix #5138) #5139
Conversation
The new controller's buttons are a superset of the old touch controller so that should be fine
@felixtrz noticed that aframe has code to animate those. Yes, it would be awesome if we can add that. Will you (or someone you know) have access to a Quest Pro
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add logic to use the fallback controller? That way if someone comes out with a new controller, aframe can still use an older controller that is compatible.
The laser-controls component used in the example I pointed above |
Are there any new buttons we should map?
Not easily but can ask around. If there's a device loaner program at Meta it will make it a bit easier for this and future work. |
Never mind. I found the button mapping profile in the meta directory. It looks it's the same than other Touch controllers. We should be good |
No, the other "buttons" are for drawing your index finger and thumb
I will ask. :-) |
Tested http://localhost:9000/showcase/ui/ on Quest Pro, the controllers are picked up and working (trigger events are registering, target ray seems correct), but no quest pro controller model is rendered, only a sphere, is that expected? procontrolleraframe.mp4 |
@dmarcos I did some digging and found where the problem is. The isControllerPresent() in tracked-controls.js is checking and categorizing the type of controller by idPrefix, which is why meta-quest-touch-pro never gets matched as oculus-touch-controls, and that's why it gets matched into the generic control every time. You might need to make an exception in the isControllerPresent to allow meta-quest-touch to be matched as oculus-touch as well. |
@felixtrz Sorry for the inconvenience. Thanks for testing and patience. I generalized the logic that loads the model. I think it should work now. If it doesn't. Can you add a breakpoint here and let me know what profiles you see in |
@cabanier and I did some digging and figured out the cause of the bug. The issue is caused by the |
As per WebXR profiles the profile id should be |
The problem is in checkIfControllerPresent, this always returns false if we don't make changes to isControllerPresentWebXR() in tracked-controls.js. The breakpoint does not run because of this, but I can give you the profiles captured in tracked-controls.js: ['meta-quest-touch-pro', 'oculus-touch-v2', 'oculus-touch', 'generic-trigger-squeeze'] |
Logic works across touch for rift, Quest 1 and Quest 2. Wonder what's different about Quest Pro. No changes should be needed to checkIfControllerPresent. The profile id is passed to that logic from here in line 275. Can you add a breakpoint there and let me know what |
The |
I've put up my fix that have the quest controller show up here: #5140 |
@felixtrz I made a change to iterate through the profiles instead of stopping at first one: Can you let me know if it now works as expected? Thanks so much |
Still does not work, in your fix, checkIfControllerPresent still returns false in oculus-touch-controls |
Would it be helpful if we jump on a call to debug together live? Happy to do so if you are available |
Sure. Are you available now? |
yes, I will shoot you an email at your gmail address for a quick zoom call |
Perfect, thanks! |
On the call now, let me know if you don't see my email |
@felixtrz Thanks so much for jumping and helping debug so quickly. I just incorporated your changes. Let me know if it works now. Fingers crossed! |
I noticed there's not a button mapping profile on the webxr repository. I'm assuming the mapping is the same as the previous touch controllers.
To test you can use the example below:
npm start
and loadhttp://localhost:9000/showcase/ui/
I haven't look at the model but if parts are separated we could also animate / highlight the buttons, trigger when pressed in a separate PR.
@cabanier Let me know if it works for you. Thanks so much for testing and congrats on the Quest Pro release. It looks awesome.