I currently have the camera set up to rotate with the same orientation of the user's iOS device. The code works fine, however, the accelerometer input is very jittery. I'm barely moving the phone and the camera is jerking all over the place. How can I make the rotation of the Camera (or any object) a smoother movement?
Here is the line of code I am using:
function Update () {
transform.rotation = Quaternion.Euler(transform.rotation.x,transform.rotation.y,((Input.acceleration.x* (-90))));
}
↧