- Home /
How to convert Native Android GyroSensor values (rad/sec) to Quaternion?
Hi,
I want to convert the gyro sensor values read from native android which are in rad/sec into Quaternion. I then want to apply the calculated Quaternion values to my camera, so that camera moves along with mobile.
So far, I have just multiplied the rad/sec values with Mathf.RadToDeg and used Quaternion.Euler(x, y, z). But it didn't help much.
Please let me know if there is any solution.
Thanks.
Answer by Bunny83 · Jun 27, 2014 at 11:12 AM
I never used the native Gyro. But if it's in rad / sec you have to: multiply by
Mathf.RadToDeg * Time.deltaTime
To make it a rotation per frame. Keep in mind that it is a relative rotation and not an absolute direction.
Your answer
Follow this Question
Related Questions
How can I get the phone orientation? 3 Answers
Sensor Fusion of Accelerometer and Gyroscope 0 Answers
Sensor Fusion - Angular Velocity 0 Answers
Publishing C# game in Android 1 Answer