The rotation values don’t seem to “stick” for me. If i select any object and change the values for rotation then deselect the object or select another object. then if i reselect the original object, the values in the rotation fields have all changed. if i tab through those fields the object will update to the new values.
Example:
add a cube object to the scene.
change the rotation values of the cube in the inspector palette to 90,-90,0
deselect the cube then reselect the cube.
the values are all changed. and if i tab through the rotation fields then the cube seems to rotate to the new values.
is this a bug?
I’ve tested it with 1.2.1 and 1.2.2 rc2
Yes it’s normal: this is because of how floating point numbers are represented in computers. A lot of this is Googleable, you can start here: Floating-point arithmetic - Wikipedia
Perhaps you could round the numbers a little to prevent them from looking confusing (I think most 3D apps do this). It looks really bad if you see 6.515661e-14 when you were expecting 0!
OK, but why does it actually change the rotation of my object. like in my second example. the rotation physically changes. not just the way the value read.
I put in some rotation values and my object changes to reflect those values.
I come back to my object later and the values are changed. I know this is “normal” but here is the problem. if i tab through the newly changed rotation fields, then my object rotates again to reflect the changed values which are completely different. I don’t see how you can work on a scene like this because my objects would be rotating to new positions all the time without me wanting them to move.
Please bare with me as I’m new to Unity, but I’m very familiar with Anark. I’m looking into converting my Anark projects to unity once i can get the program under control.
I just checked this out for myself and it does indeed clear the Y axis rotation, then subsequently alters the object’s actual rotation after tabbing through the fields. That would seem to be a bug, since the code which attempts to normalise the rotation angles is incorrectly changing them to something which isn’t equivalent to the original value.
if you really want to see the effect imediatly, just enter a value like 270, 40, 0. Deselect then reselect the object. now you will have 270.019, 0, 0. tab throgh the fields and your object will rotate to those new values.
For a moment there i thought i was loosing my mind