Using a lerp on a rotation

Hey guys, I’m trying to rotate my camera with a slerp but I am having trouble. Here is what I currently have.

GameObject.FindGameObjectWithTag("MainCamera").transform.rotation = Quaternion.Euler(Vector3(35f, 45f, 0f));

I’ve been playing around with Quanternion.lookRotation, euler, slerp, lerp, etc etc but haven’t been able to figure it out. If someone could explain what I need to use then that would be great.

Try:

Camera.main.transform.rotation = Quaternion.Slerp(Camera.main.transform.rotation, Quaternion.Euler(Vector3(35f, 45f, 0f), speed * Time.deltaTime);

You don’t show context, so I’m not sure how you are calling it. This code need to get executed repeatedly over many frames by executing inside something like Update(), FixedUpdate(), a coroutine, etc.