I need help with the slerping of rotations.

I need an object to rotate from its original rotation on its y axis to the cameras rotation on the y axis.

Here is my code:

if(moving){

transform.rotation = Quaternion.Slerp (transform.eulerAngles.y, camera_rot, Time.time * 10);

}

I am getting this error message:

The best overload for the method ‘UnityEngine.Quaternion.Slerp(UnityEngine.Quaternion, UnityEngine.Quaternion, float)’ is not compatible with the argument list ‘(float, float, float)’

I think I am not using the slerp correctly.

Well, as stated in the error, you give the slerp function 3 floats. Remove the “.y” part. If you only want to rotate on the y axis, you can just use vector3.Angle, and than transform.Rotate or something.