Hi guys ,
i am making a simple car game prototype for mobile in that if i rotate my device the camera that fallow the car should rotate in opposite angle the code i did work how i want it to be but the problem is it’s not rotating smoothly .can any one help me whit it ?
void FixedUpdate ()
{
// This will rotate the cam in Z axis
transform.localEulerAngles = new Vector3 ( 20,0,-(Input.acceleration.x * Time.deltaTime * 1000) );
}