but when i press the “a”-button, the object starts rotating to random y-directions (like 180.0037, 0.003726649 or 180.004) but never stays at the desired y-value 180.
I am using no other code on this object.
Do you know, what is wrong with this?
Nothing is actually wrong, it’s just standard floating-point imprecision. Rotations are stored internally as quaternions, and translating back and forth between euler angles isn’t 100% precise.
I am calling the Rotate function from ´the method Update, but using Quaternion.Euler and Quaternion.Slerp instead of Transform.Rotate solves the problem, thanks.
But what is the diffference between these functions?