Skip to content
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

After exiting WebVR, rotating on wrong axis in Firefox #15

Open
jsantell opened this issue Jan 22, 2018 · 3 comments
Open

After exiting WebVR, rotating on wrong axis in Firefox #15

jsantell opened this issue Jan 22, 2018 · 3 comments
Assignees

Comments

@jsantell
Copy link
Contributor

jsantell commented Jan 22, 2018

STR on Pixel, Firefox for Android, 57.0.4:

Can go to landscape while in VR and back to portrait after exiting, same result. Happens with or without the changes in #13.

Update: When rotating to enter VR, the orientation screen transforms are never updated in fusion-pose-sensor, and neither subsequently triggered as no orientationchange events fire, so the screen transform is stuck in VR orientation:

this.worldToScreenQ.setFromAxisAngle(new MathUtil.Vector3(0, 0, 1), -Math.PI / 2);

Could be a platform issue?

@cvan
Copy link
Contributor

cvan commented Feb 5, 2018

@bluemarvin @snorp have you seen this issue on Firefox for Android? I can file a Bugzilla platform issue, but I figured y'all might have some insights as to what's going on here

@jsantell
Copy link
Contributor Author

jsantell commented Feb 6, 2018

Looks like this has been an issue for a long time, can reproduce on older and recent A-Frame demos as well. Not 100% confident in the issue being orientationchange events firing without a stripped down test case, but reproducible enough

@jsantell
Copy link
Contributor Author

Some updates:

Trying to recreate a minimal test case using fullscreen and orientation lock, but can't seem to reproduce the issue we're seeing in CardboardVRDisplay.


Separately, when testing the local demo, it looks as if the handlers are frozen after returning from "VR" (fullscreen) mode. Put a breakpoint/console.log in the orientation change handler in the FusionPoseSensor to indicate when the change is detected. This will no longer fire after returning from "VR" mode. With devtools open (via WebIDE), bind another orientationchange event:

window.addEventListener('orientationchange', e => console.log('change');

Now, rotating the device, we'll get the original FusionPoseSensor orientationchange event, as well as our new one we added via WebIDE, as if binding a new event after "VR" mode "unfreezes" the orientationchange events.

This is very weird. @cvan is the above STR sufficient enough for filing a platform bug? Disappointed that the stripped-down test case still cannot reproduce the issue, so maybe there's another platform API that's possibly interfering here, but not sure what to make of the event breaking, and becoming re-enabled when binding another event subsequently. 😑

@cvan cvan self-assigned this Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants