In my scene I have skybox and camera.
First when I turn phone to left/right I see horizont behind by back, eventually after some rotating camera will be in upside down position somehow. It behave as if I attached it to rotating ball. Axes are in proper places (so don’t recommend me to swipe x,y,z). Just looks like game scene is turned at 90 degrees. When I dragging x,y,z fields in object properties camera moves as it should.
I attached this script to camera:
using UnityEngine;
using System.Collections;
public class GyroRotate : MonoBehaviour {
void Start ()
{
Input.gyro.enabled = true;
}
void Update ()
{
transform.Rotate (-Input.gyro.rotationRateUnbiased.x, -Input.gyro.rotationRateUnbiased.y, -Input.gyro.rotationRateUnbiased.z);
}
}