- Home /
rotation.y gets wrong data
i know this must be something very simple but i can't figure out why transform.rotation.y is giving me 0.** and not the right number
when my rotation on Y is 200, and i put a script on there with print("" + transform.rotation.y); its giving me 0.89342873924 or something
Answer by Wolfram · Jun 26, 2012 at 03:18 PM
Read the documentation, transform.rotation is a Quaternion, not three angles.
What you are looking for is transform.eulerAngles.
oh whoops, thats exactly the same solution as when i tried to find a way to use Vector3 on rotation. Thank you!
Your answer
Follow this Question
Related Questions
yeild WaitForSeconds Bugged 1 Answer
A script that will assign "q" and "e" to horizontal rotation of character? 1 Answer
Making a FPS, my gun floats sideways in front of me? 1 Answer
flight control 4 Answers
fbx animation beats script animation? 2 Answers