Hey guys, I got a bit obsessed with understanding exactly how to adjust the quaternion in Input.gyro.attitude to work as a good camera rotation. I never did really grasp quaternions as I hoped but I have created a gyro camera script that I think may be helpful to others. Here it is!
[Sharing] Gyroscope Camera Script (iOS tested)
Code (csharp):
- using UnityEngine;
- using System.Collections;
- {
- private float initialYAngle = 0f;
- private float appliedGyroYAngle = 0f;
- private float calibrationYAngle =...