Hi to all.
when i add a rigid body example a cube in my scene. and rotated the cube in 180 in x-axis. after playing the game .the rigid cube’s rotation axis is changed to
rotation.x=-5.008937e-06
rotation.y = 180.0
rotation.Z = 180.0
i don’t known why this happening to the rigid body.
why it is not changing to 180 in axis.
and also i found the same
rotation.x=-5.008937e-06
rotation.y = 180.0
rotation.Z = 180.0
in the game play of the cube also.
can any one help me in this mater.
Thanks in advance
If you insist on using Euler angles, you just have to live with this.
Euler angles are not suitable for complex 3D engine, so Unity cannot use them internally. They have a number of problems which make them unsuitable. Namely, that you cannot interpolate euler angles, and they are subject to gimbal lock.
Internally, you have to use quaternions or matrices. I guess Unity uses quaternions. So although you apply a set of euler angles, Unity then converts that to a quaternion orientation. Then in the property panel, it converts back to euler angles again. Now you see, for any given orientation, there are an infinite number of valid euler angles which are equivalent. Unity cannot possibly know which one you actually set. It just has to use an accepted method of converting from a quaternion orientation to euler angles. There are several, and none of them always produce the most obvious set of euler angles that a human would have input. So sometimes you’re going to get some weird angles like this, and there’s really not much you or Unity can do about it, except if you ditch euler angles and start using quaternions instead.
Basically: it’s normal, don’t worry about it. 
–Eric