- Home /
Input.gyro.attitude Accuracy
In my app, I need to be aware of the device rotation. I am trying to pull the y-axis value from the gyroscope using the following:
var y = Input.gyro.attitude.eulerAngles.y;
If I simply output that to the screen and turn in a circle (holding my phone straight up and down...as if you were looking at the screen), I get the following:
270, 270, 270, 270, etc...270, 290, 310, 20, 40, 60, 80 (very quickly)...90, 90, 90, 90, etc...blah...
Is there any way to account for this jump in numbers?
Answer by iLyxa3D · Jul 19, 2017 at 09:44 AM
Check https://docs.unity3d.com/ScriptReference/Vector3.Slerp.html
And Quaternion.Slerp. Recommening to use Quaternions, instead of Vector3 eulerAngles.
Your answer
Follow this Question
Related Questions
How to transform local space to world GYRO space on ios? 0 Answers
NO Gyro on iPhone 4S 2 Answers
New Gyroscope Controls in Unity 4? 2 Answers
Using Gyroscope with Android 1 Answer