Question by
LightFury001 · Jun 30, 2021 at 03:38 PM ·
unity 5rotationquaternionrotations
i am trying to rotate my gameobject about x axis and at the same time i am trying to clamp its rotation to some fixed upper and lower limits but i am getting some real wierd output. ?
Hey guys, in the image i have provided is the code which is executing rotations with respect to mouse movements. When i dont clamp the rotations it works just fine. But the moment i clamp the rotation of my gameobject the upper limit works just fine but when trying to reach lower litmit, when the rotation approaches to 0, it(the game object's rotation about x axis) gets back to the upper limit which i am not getting why . Hope you understand my problem. :-)
unityanswer1.png
(2.8 kB)
unityanswer2.png
(20.3 kB)
Comment
Your answer
Follow this Question
Related Questions
Convert rotation vector or matrix to Quaternion 1 Answer
How to get Quaternion from Transition Matrix 0 Answers
Flip 3D Character Rotation 180 on Y axis 1 Answer
Rotating 3d person character 0 Answers
Making 2D Compass From Quaternion 1 Answer