So I had made a cube and rotated it's z to 40. But when I typed this:
void OnGUI()
{
GUI.Label(new Rect(10,0,150,150), (Mathf.Rad2Deg*transform.rotation.z).ToString());
}
Then the number on the screen that appeared was not 40, it was like 19.278138 or something.
What's with that? How do I get it to give me the value that I inputted in the inspector?
void OnGUI()
{
GUI.Label(new Rect(10,0,150,150), (Mathf.Rad2Deg*transform.rotation.z).ToString());
}
Then the number on the screen that appeared was not 40, it was like 19.278138 or something.
What's with that? How do I get it to give me the value that I inputted in the inspector?