Answers for "Why does rotating via viewport give different values than inspector rotations?"
http://answers.unity.com/questions/54267/why-does-rotating-via-viewport-give-different-valu.html
The latest answers for the question "Why does rotating via viewport give different values than inspector rotations?"Answer by jeffreylmeyer
http://answers.unity.com/answers/1280299/view.html
So how do we calculate the same values the inspector shows?
For example if I have Inspector values of:
Transform.rotation.x = 160 , .y =-30, .z=0
how do I get those values in C#?
The engine should provide that in a simple manner...
I'm guessing somehow they convert 0 to 360 into -1 to +1 ???
and what is the point?Mon, 05 Dec 2016 02:12:53 GMTjeffreylmeyerAnswer by loopyllama
http://answers.unity.com/answers/54274/view.html
<p>You are viewing the rotation through euler angles, or an x y z in degrees. Internally the rotation is represented through quaternions which is 4 floats (these 4 floats are not simply angles or degrees). To answer your question a 0 degree rotation is the same thing as a 360 or -360 degree rotation...meaning your model is at the same angle, at that frame. You will see equivalent values "flicker" like this is the viewport because you are viewing the internal quaternion converted to an euler angle. Rest assured knowing there is nothing broken about this and it is normal. Quaternion's solve the problem of gimbal lock which plagues euler angles. </p>Fri, 25 Mar 2011 04:40:36 GMTloopyllama