How to rotate the camera smoothly using accelerometer

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) );
		
	}

You can use Vector3.SmoothDamp. It’s used to smooth transition from an origin Vector3 to another target Vector3. It’s probably what you are looking for.