localEulerAngles don't match Inspector's values!

I am attempting to record the rotational positions of the bones in an object while they animate. After selecting one of the bones and watching it’s values, they are very different from the values this line of my script produces.

Debug.Log(“Rotation=”+transform.localEulerAngles.x+" , “+transform.localEulerAngles.y+” , "+transform.localEulerAngles.z);

What is causing this and how can I get the values like they are displayed in the Inspector.

Thanks, everyone.

Are you looking at the inspector in debug mode? Because, I believe that normal mode shows it’s world rotation.

I’m looking at the inspector values both while editing and while the game is playing.

He means debug mode in editor. Its a special editor mode that will show local rotations as well as world rotations. This is the difference and your problem.

I have been looking at the values in the Inspector window while the app is running. I have not been using the Debug mode in MonoDevelop, if that’s what everyone means.

Either way, what I need to output in the end are the values as they are displayed in the Inspector window. I know that Unity does some conversion from Quaternions to Eulers in the background. I just don’t understand why referencing the “localEulerAngles” doesn’t work. In fact, I have attempted to reference every coordinate system available to the Transform and nothing is giving me the values needed to recreate the animation from this script.

Arh! Frustrating!

Can someone in the know confirm that transform.localEulerAngles is the same as transform.rotation.localEulerAngles

I said:

You said:

No, that is not what we mean. We mean the editor. The unity editor, not the mono develop IDE. You click the top right panel little lines icon and enable debug mode and extended options for the editor.