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

Bug when phone is flipped #21

Open
DenisMondon opened this issue Jan 23, 2018 · 1 comment
Open

Bug when phone is flipped #21

DenisMondon opened this issue Jan 23, 2018 · 1 comment

Comments

@DenisMondon
Copy link

Hi, great library!

When using the phone like this: phone above my head with screen facing the ground, a bug appears.
The layout is "jumping"...

Does anyone have the same problem?
Thanks

@Sloy
Copy link
Member

Sloy commented Feb 1, 2018

Hi @DenisMondon, thanks for reporting it.
You're right, when the phone is facing down the parallax effect gets confused. It only happens when you start the parallax in a normal position and then move the phone to that orientation. It doesn't happen when you start the parallax when facing down already.

I'm only guessing it's because the roll value is jumping suddenly from 1.0 to -1.0.

I guess an easy fix could be to discard such jumps and avoid updating the parallax when the roll goes immediately from 1.0 to -1.0, so that only intermediate and more reasonable values are used for the effect.

Do you think that would solve the issue? We don't have the time for it at the moment, but if you'd like to open a PR for it we would be grateful and include it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants