Mish
1
Hi
I am working on an augmented reality game, which has an unity scene as an overlay to the iPhone camera view. What I want to achieve is that when the phone is rotated up with the camera facing the celling or down towards the ground, the unity camera will follow realistically making is look like the object in the scene is where it would be expected.
So far I am unity the iPhone gyroscope for the rotation.
newAngles.x += (Input.gyro.rotationRate.y * (180 / Mathf.PI)) * Time.deltaTime;
However the rotation gets offset after a while due to the relative calculation of the rotation. What would be the best way to recalibrate the gyroscope?
Mish
2