- Home /
Avatar Rotation Control [UnityScript]
Hey everyone, I'm working on a school project and we're engineering some flight controls into our main character (a pigeon). I have the guy flying around and making a banking motion with GetAxis("Mouse X") and GetAxis("Mouse Y") and then utilizing the Transform.Rotate on the Z axis to have the pigeon tilt on it's sides.
I'm wondering if there's a method to limit how far the pigeon rotates (like measuring the degrees that it goes). I would love to have it translate it's transform upon hitting a certain degree of rotation and that's what I'm after more than anything.
"huh" ? are you familiar with the eulerAngles functions. just look in the doco.
you can look at the eulerAngle and stop it or whatever you wish
Your answer
![](https://koobas.hobune.stream/wayback/20220613095926im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Model rotation and hierarchy of game objects - not rotating! 1 Answer
Lock rotation axis? 4 Answers
LookAt Problem 1 Answer
Object rotation 2 Answers
Transform.Rotate() problem : Avoid Z-axis rotation ? 0 Answers