-
-
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
Initial camera rotation incorrect (Chrome/Android) #3650
Comments
@homerjam I just checked your website on my Honor 6x and it seems to be working fine, unless i don't understand your issue. Can you confirm it is still a problem? Honor 6x | Android 7.0 EMUI 5.0.2 / Google Chrome 67.0.3396.87 / aframe 0.8.2 |
Hi @Xrispy7 thanks for testing. Yep still a problem, just to help clarify the first image is what you should see on entry to the site, the second is what you actually see...
|
I suspect you are correct. I've attempted to raise an issue for OnePlus as that seems more likely. Leaving open for now until I get clarity. |
Can you also try with Chrome Canary (m69) to see if it still reproduces? |
Same issue in Canary. I suppose this would indicate a device/sensor problem? |
FWIW this also happens on the A-Frame examples. I have now filed a report with OnePlus. In the meantime if anyone has any ideas for a workaround (I can detect a OnePlus device using user agent) that'd be appreciated. I'm wondering if I can somehow offset the devices accelerometer Y rotation - not sure at what stage I need to do this though - Browser/Three.JS/WebVR Polyfill/A-Frame?? |
I think I have tracked down where the offset needs to go: https://github.com/immersive-web/cardboard-vr-display/blob/d97e0ec3e4144bd227b498bd7afa6f6270f712d2/src/sensor-fusion/fusion-pose-sensor.js#L183 |
Due to the sensors being incorrect on specific devices, not sure how this is something the polyfill can detect and handle, and should most likely be handled after receiving an updated pose -- can probably be handled by nudging the A-Frame camera on every frame; more info: immersive-web/webvr-polyfill#310 (comment) |
The angle is still wrong in Chrome M69 when using the WebXR Device API (For Chrome M69+) origin trial. Are there any updates on this? |
If WebXR is enabled, WebVR will not be used, falling back to the webvr polyfill. In terms of where in the chain (browser, three, polyfill, aframe) this should live, modifying the pose anywhere would work. The issue that is unclear is how to detect if a device is using incompatible values for the |
Okay, some really strange things I'm noticing which may be related. The following is affecting ALL Chrome-based Android browsers (Chrome, Canary, Chrome Dev, Chrome Beta, Edge) on my Samsung Galaxy S9+:
Here is an demo for my 404 Page (WIP), which is affected: https://404d.surge.sh Using latest versions of all browsers. |
I'm also working on an Android APK wrapper solution which is experiencing the same issue, without being deployed. |
That's a really strange one. Hm. It works for me on Pixel devices in Chrome on the surge link FWIW. Some ideas, but need to know what is determining the pose on S9+ on Chrome; some links of where in the polyfill you could check some state:
My guess is something with the Generic Sensor status and permissions, maybe referenceScreen. |
@jsantell Aha! Well, I just noticed that the orientation does matter; the initial position is only backward when you start in portrait mode, which is pretty common on mobile, so I do still see this as an issue. Thanks for pointing that out. I'll have to look into the links/info you sent a bit more, but I still find it perplexing that the same, exact code is behaving differently depending on from where it's served. As I mentioned, one is served from surge.sh, and the other from my laptop using Why on earth would they behave differently if they're both being served from a web server? That is pretty odd to me. UNLESS... hmmm... Could it be that surge.sh is Will have to look into this further. Any thoughts appreciated. Thanks. |
If orientation affects what you see, then maybe the But confirming what path the code is being executed on would be helpful -- you can also disable Generic Sensors in chrome://flags which should trigger the devicemotion path |
Also, check out to see if you see the same results on the cardboard vr display demo (https://immersive-web.github.io/cardboard-vr-display) and the webvr-polyfill demo (https://github.com/immersive-web/webvr-polyfill), most likely this issue can be tracked in the cardboard vr display |
This is still an issue, and it seems to be affected by
As it is now, I'm experiencing this Android Chrome. I'm on a Samsung Galaxy S9+. Firefox and Samsung Internet appear to show the correct orientation regardless of protocol and orientation. This has been a big hurdle in embedding into a native app, because the camera is always facing in the wrong direction. |
@dsinni can you repro in the cardboard-vr-display demo? Are the demos here consistent with expectations? https://intel.github.io/generic-sensor-demos/ Not sure if those demos use referenceScreen but that's something else to test as well |
@jsantell Yes, the cube is appearing approximately 90 degrees to the right in portrait, but fine in landscape. There appears to be an https redirect, so I couldn't try the http version. |
@dmarcos generic sensors are only https and localhost, sounds like an issue with that (falls back to devicemotion) -- if having issues only in one orientation my guess is referenceScreen in generic sensors isn't working (but was added in chrome 65-67ish) and I'm not aware of another implementation |
@dmarcos Yes, from my experience, Beside the issue presenting itself on mobile Web, this bug is hindering the possibility of effectively encapsulating A-Frame projects in native apps via Cordova, as the bug persists there. Otherwise, it seems like a pretty decent solution for distributing A-Frame apps as native, at least for Android, so it would be great if something could be done. Appreciate all of the great work and congrats on |
FWIW, on a Galaxy S6 in Chrome 72.0.3626.96, when I start in portrait orientation the first frame is correctly oriented (in my project, https://elfland-glider.surge.sh/), then the rest are 90 degrees to the left. If I start in landscape orientation, the camera is rolled 90 degrees, but recovers over a fraction of a second. This doesn't happen over HTTP, nor in Firefox, nor in Oculus Browser, Samsung Internet VR, nor on desktop. It does look like mobile Chrome over HTTPS is using a different API to get the orientation. |
After lots of testing on loads of different devices the results are so mixed, some start 180 degrees out, some -45, some 45, some appear quite random. |
Description:
The initial/default camera rotation seems to be wrong since an update to Chrome/Android. As seen in the example, the camera should face the logo at the start (which it does on desktop). However on the device specified below the camera faces 180 degrees.
Side note - is there a 'look at' type method for the camera that would correct this for me in the short term?
The text was updated successfully, but these errors were encountered: