I have a basic gyro script that allows users to look around using the camera. The initial quaternion.identity, however, is always north by default, it seems, and I have to turn to my left to get an accurate default rotation. Is the gyro.attitude informed by the compass? What would be the solution in this case if so; an initial offset, I assume?
Thanks for any and all answers
Set your player’s rotation at start as you’d like, placing gyro inside playerObject.
After it’s loaded, unparent and reassign where you want it to.
If it’s always north, local rotation only, so being childed it looks Z = 0.
Turns out what I wanted was gyro.rotationRateUnbiased.
transform.Rotate (-Input.gyro.rotationRateUnbiased.x, -Input.gyro.rotationRateUnbiased.y, Input.gyro.rotationRateUnbiased.z);
and not gyro.attitude.
//transform.localRotation = gyro.attitude * new Quaternion(0,0,1,0);
Thanks for the suggestions, @Arpian and @levoTNTO.