- Home /
 
 
               Question by 
               Tea_Doogun · Dec 12, 2012 at 10:13 PM · 
                rotationprint  
              
 
              'print' not giving the correct rotation.y value
Why when i apply this simple print script to a cube does it print a different value to what is in the inspector?
 function Update () {
 print (transform.rotation.y);
 
 }
 
               It should just print the y rotation value, right? but when i turn the cube 90 degrees in the inspector, it prints '0.7'. There is a kinematic rigidbody on the cube.
Anyone know why this is?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by CodeMasterMike · Dec 13, 2012 at 06:39 AM
The difference is that in the inspector you see the rotation in angles (normally between 0 -> 360), but the internal rotation calculation uses Quaternion, so what you get from the rotation is probably the Euler angles.
Your answer