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

Polifyll wont work on iOS - Reproducible example inside #356

Closed
ivnnv opened this issue Apr 27, 2020 · 5 comments
Closed

Polifyll wont work on iOS - Reproducible example inside #356

ivnnv opened this issue Apr 27, 2020 · 5 comments

Comments

@ivnnv
Copy link

ivnnv commented Apr 27, 2020

The polyfill wont work on iOS, the view doesn't get updated while moving the device.
Even after requiring permissions and https on the site, when on the scene, the module tries to get the data from
var rotRate = deviceMotion.rotationRate;
and then:
this.gyroscope.set(rotRate.alpha, rotRate.beta, rotRate.gamma);

And then the console shows hundreds of errors (one per frameloop)
rotRate.

I have created a fork (and a PR) on the webxr-samples repo with which has a reproducible demo with the requiring permissions button to easily reproduce this issue on any iOS device:
https://ivnnv.github.io/webxr-samples/

PS: I have tried a workaround bypassing the motion capability detection here:
orientation-types
to attach to deviceorientation instead devicemotion event, but the alpha, beta, gamma values sent to deviceOrientationQ.setFromEulerYXZ doesnt work neither.

  • webvr-polyfill version: 0.10.11
  • Browser name/version/release channel: Safari 13.4.1
  • Operating System: iOS
@GiuseppePennisi
Copy link

is there any update on this problem?

@ivnnv
Copy link
Author

ivnnv commented Jun 23, 2020

This should be fixed now because they updated cardboard-vr-display to 1.0.19.

@GiuseppePennisi
Copy link

GiuseppePennisi commented Jun 23, 2020

ok, thanks. If I can ask, how did you request permissions? I follow this guide but it doesn't work.

@ivnnv
Copy link
Author

ivnnv commented Jun 23, 2020

I also created another PR on the webxr-examples repo that shows how to approach requesting permissions prior to get into vr/xr mode (mandatory for iOS)

@jsantell
Copy link
Contributor

@ivnnv unfortunately, merging things outside of Github UI separates committer and authoring in some of its displays, but your contribution is still attributed to you, and you are rightfully in the list of contributors -- contribution credit is absolutely important, so I hope this clarifies things. And thank you!

@GiuseppePennisi with immersive-web/cardboard-vr-display#42 landing, webvr-polyfill 0.10.12 and up should use the latest cardboard-vr-display with the fix. Please reopen if you're still running into any issues

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

3 participants