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

Parameter orientationBase: GyroNorm.WORLD chrome/android #24

Open
firewolf opened this issue Aug 17, 2016 · 7 comments
Open

Parameter orientationBase: GyroNorm.WORLD chrome/android #24

firewolf opened this issue Aug 17, 2016 · 7 comments

Comments

@firewolf
Copy link

firewolf commented Aug 17, 2016

I have problem with orientation sensor and its respect (or better - leak of respect) to GyroNorm.WORLD on android (6.0.1)/chrome (52.0.2743.98). The problem is - it is not working for me, values are relative to device, not to real orientation with respect of NORTH pole.

@dorukeker
Copy link
Owner

I've just tested this, and can confirm I had the same thing on newer Android+Chrome. (iPhone behaves as expected).

Also normally if you don't define the orientationBase in the settings, it should show GAME for iPhone and WORLD for Android by default. This also does not work as expected for Android.

Gyronorm is using an underlying library (Full Tilt) to get the orientation values from the browser. The WORLD vs GAME setting is handled at that level. The same issue is mentioned here for FullTilt adtile/Full-Tilt#22

Seems like this happens because Chrome has changed how they handle the device orientation by default. That breaks if you want world-based values. If you use game-based values both devices work like before. I will keep an eye on if/how FullTilt will address this.

For now I don't have a quick solution. I will keep this thread open for further updates.
Please add any updates on your side here; so other following can benefit from that.

Cheers,
Doruk

@janrg
Copy link

janrg commented Sep 25, 2016

I have the same problem, with Chrome on both android and iOS.

@jasan-s
Copy link

jasan-s commented Oct 30, 2016

@dorukeker
Copy link
Owner

dorukeker commented Oct 30, 2016

I have not tested this. My experience is that similar events are not implemented (or implemented differently) across device+browsers. Also at the top of that page it warns it is not a standard and should not be used for production.

Having said that I have not used tried it myself. I will keep it in mind when/if I dive deeper into this issue.

@jasan-s
Copy link

jasan-s commented Oct 30, 2016

Im on android 5.1 using chrome 54.0.x and I'm still getting absolute orientation alpha from the deviceOreination event. I thought this was affecting all chrome 50 and above? or is this affecting when the condition is android 6 and chrome ver > 50

@dorukeker
Copy link
Owner

In the earlier versions of Chrome the default orientation base was WORLD. Meaning you get absolute values. If you want relative values, you need to set the orientation base explicitly to GAME. See the parameters you can pass when you first initialize GyroNorm object.

@angularsen
Copy link

Full Tilt project seems stagnant, there are a couple of forks that added the absolute API for google.
https://github.com/adtile/Full-Tilt/network

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

5 participants