- Home /
Rotation not being updated more than 4 degrees
Every single frame updated until the forth one the rotation angle is being updated as it should but then when it becomes equal to 4 it stops. What am I doing wrong ?
Answer by robertbu · Sep 29, 2014 at 03:39 PM
For future posts, please include your code in your question. After pasting in the code, select it and use the 101/010 button to format it.
The most likely issue is that you are reading values from transform.eulerAngles. The representation does not remain constant. For example run this code:
transfrom.eulerAngles = new Vector3(180,0,0);
Debug.Log(transform.eulerAngles);
The results you get back are (0,180,180)...the same rotation represented differently. One solution is to maintain your own vector3. You first do any rotation and testing on that Vector3, then you assign it to transform.eulerAngles.
See the EulerAngles section at the bottom of this question:
http://answers.unity3d.com/questions/799824/oafatwhy-does-transformrotationx-45-not-work.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613164018im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Compare euler angles to check if they describe the same rotation. 1 Answer
How to convert quaternion to vector3 with specific multiplication order? 5 Answers
Smooth 90 degrees rotation on input . (infinite number of times) 1 Answer
Clamp an object on 2 sides 0 Answers
Read rotations around local axis 4 Answers