universal-tilt.js icon indicating copy to clipboard operation
universal-tilt.js copied to clipboard

Mobile device flat on surface to get tilt position 0

Open JonasGredig opened this issue 3 years ago • 1 comments

Hi

I found the issue that the physical tilt of the device triggers the tilt only works when the mobile device is flat on a surface. Since a phone or a tablet is usually not in that position when the script is loaded I would suggest to define the first position you get from the gyro lib to be set as the 0 of the tilt. I think instead of an absolute 0, its a relative to the starting point. If that makes sense 👍

Love your fork of the original lib!

Kind regards Jonas Gredig

JonasGredig avatar Feb 16 '22 22:02 JonasGredig

Hey Jonas,

did you manage to solve it somehow?

bw16sk avatar Nov 12 '23 18:11 bw16sk