# Why are objects rotation rotated a little bit when they are set to 0?

I have a simple python script that tells me an objects rotation (a property reads the rotation). I have a static object with its rotation set to (0, 0, 0); however, when I load up the scene, the property reads a long decimal with a value very slightly higher than 0. This shows that the object has very little rotation. Is there a way to fix this other than changing the objects rotation with a script? In other words, keep the rotation at 0 at scene start? Thanks!

All terms of the orientation matrix are expressed in float values (floating point numbers). These numbers have a specific precision. This means when you calculate with them you get very small, but existing deviations from the "ideal" number.

This is especially noticeable around zero. Therefore you might print something like -0.0. This seams illogical but it means you have a number that is smaller than the precision of the formatter.

Unfortunately you did not include any further details such as what term you are reading and what the value is or what your code is.

My own investigation shows me:

<Matrix 3x3 ( 1.0000, 0.0000, 0.0000)
( 0.0000, 1.0000, 0.0000)
(-0.0000, 0.0000, 1.0000)>


The [2][0] value is indeed -0, but it has no further consequences. You will not notice that in your scene.

• Thanks for the answer, and, what if I'm getting 0.0006? – blackhole Jan 6 '16 at 4:05
• In that case I would like to see your demo file. – Monster Jan 6 '16 at 5:13
• Ah. I just noticed its parent is dynamic. However, the parent is directly above the ground, and is not affected by anything other than gravity. Do you think gravity would of caused the small rotation? Its always the same thing. – blackhole Jan 7 '16 at 0:48
• Gravity is a force (0,0,-9.8). It can result in linear and angular velocity -> changes to location and orientation especially when colliding with other objects (e.g. with the ground). – Monster Jan 7 '16 at 6:03
• Ah. I thought it was something else as it always rotates to the same extent. Thanks ;) – blackhole Jan 8 '16 at 1:50