Do you notice that sometimes, the number in transform is weird. Like:
- -90 to -89.9801
- 270 be 271.00001
- or like this
Even that what you set originally is 90 or 270.
Why does this happen? Does it have some connections of unity's mechanisim?
I think the reason is that Unity does calculate its transformations with quaternions. The Euler Angles have to be calculated into a quaternion and so there's a little inaccurateness.
The value displayed is a conversion from the quaternion value.
https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
Float always brings a bit of inaccuracy.
Why Are Floating Point Numbers Inaccurate?
But mostly the first part. What is displayed is just for you to understand but this is not what Unity uses. You will also notice some jumps from 180 to -90 or 360 to -180 when you are rotating all axis. This is again due to the fact that a quaternion is just a direction regardless the 3 axis (quaternion actually has 4 dimensions) but based on angles and trigonometry.