-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
daydream-controls doesn't work #2677
Comments
Cool, will also check it out. I wonder if the Gamepad ID changed. |
Does |
The webvr.info examples don't filter by id but take whatever first gameapd they encountered. If I have to bet Chrome just changed the |
With the latest controller update, the ID string is still "Daydream Controller", and works on the webvr.info examples -- the glitch link above doesn't have any results in |
mmmh... |
It appears that |
@caseyyee is that an |
Yeah, don't know. I've also been using https to make sure that's a non issue as well. |
OK interesting. If I let it sit for a while, it will start to work. Not sure why there is a delay. Definetly some kind of weird inconsistency. |
Order does matter. I'm not sure how things are staggered, but this is the explicit order: query for let gamepad = null;
navigator.getVRDisplays().then(displays => {
let gamepad = navigator.getGamepads()[0];
});
window.addEventListener('vrdisplaypresentchange', () => {
gamepad = navigator.getGamepads()[0];
}); Let me know if that works. |
If truly required, this explicit order is a little troubling, since it is perfectly reasonable for an experience to provide gamepad functionality outside VR, as well as inside |
I 100% agree. I'd look at these spec issues: immersive-web/webxr#184 and immersive-web/webxr#30 (and its follow-up issue: immersive-web/webxr#194). Feel free to chime in as well; developer ergonomics are important to address in these specs before these APIs' implementations ship to users. |
Should try to fix for 0.6.0 yes? If the timing issue is indeed the culprit, then do we need to ensure that getVRDisplays has returned before we allow the tracked-controls system to actually call getGamepads? If so, is there any reliable way to tell whether that has been done (e.g. scene property) ? |
See latest comments from me on #2769, am not seeing errors mentioned |
Hey there, as an extra data point. Here's my tests and what I saw with the Pixel XL this morning: https://codepen.io/machenmusik/pen/YQGrWQ For all examples: Does't work with standard Chrome. No controller at all. |
do you have an origin trials tag on any of those that would enable native WebVR via Daydream? Do you have the flag thrown manually on Canary and Beta? |
anyone able to answer questions above in #2677 (comment)? |
I thought that interacting was supposed to be required, for security/privacy purposes. The fact that "letting it sit for some time" works surprises me, maybe that's the race condition mentioned above |
@dmarcos should this be closed like #2769 (comment) ? |
Closing this because for the reasons explained here: |
(not closed yet?) |
daydream-controls
doesn't work:Looks like
isControllerPresent()
is returning false intracked-controls.js
Daydream controller is confirmed to be working on webvr.info/samples
This happens with both Chrome Canary and regular Chrome. I think this may have been due to the controller update I received last week since nothing in the controls seems to have changed.
Viewable example:
https://iridescent-team.glitch.me
Edit here:
glitch.com/edit/#!/join/6963d888-4dfa-4b51-93ce-ba100c9fb78b
cc @machenmusik @cvan for a look-see.
The text was updated successfully, but these errors were encountered: