Quaternion.Lerp interpolates wrong

Hi guys,

I got a little problem again. I’m trying to interpolate between two angles,
but unity interpolates entirely wrong even though I gave him the right angles.
(I testet it with print before.)

What am I doing wrong, why doesn’t he simply change the degree a little bit?

cam.transform.rotation = Quaternion.Lerp(new Quaternion(
cam.transform.eulerAngles.x,
cam.transform.eulerAngles.y,
cam.transform.eulerAngles.z,
cam.transform.rotation.w), 
new Quaternion(
77f,
cam.transform.eulerAngles.y,
cam.transform.eulerAngles.z,
cam.transform.rotation.w)
, 0.3f);

he kinda messes up the entire rotation. He also changes the z angle for example…something he shouldn’t do oO

Thanks for any help.

Quaternions are not euler angles and can’t be treated as such…you can’t stick the y and z from euler angles into the y and z of a quaternion and have it work at all. Nor can you use 77 as the x; all 4 elements in a quaternion range from -1.0 to 1.0.