- Home /
Hinge Joint 2D rotating 180 in the opposite direction when object's rotation reaches 180 or -180(with gif)
The title explains the issue, I made this little gif to explain my issue since it's pretty difficult to explain this in words.
The green object is the one being rotated by me and the blue one is the one being rotated by Unity trying to keep the angle between them within the angle limit(180 degrees, represented in red), everything works great up until the green object reaches 180 or -180 degrees, at that exact moment Unity thinks that it's better to rotate the blue object 180 in the opposite direction.
I Found out that this guy has had encountered the same issue, but I wasn't able to figure out his solution properly or It is janky.
I'd really appreciate any help! or ideas!!
Edit: I tried recreating the way Hinge Joint works and I somewhat managed to get it to work, however, the problem is still there and it makes me think that there's no fix for this because the way Unity handles rotations(I.E. 0 is also 360 in Euler angles(or 180 degrees from 0)).
Your answer
![](https://koobas.hobune.stream/wayback/20220613011749im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Move a 2D "Chains" end-effector to a certain point via physics. 0 Answers
Rotating 2D sprite to match surface. 0 Answers
Limiting the rotation of an object 1 Answer
Clamp rotation of sprite? 0 Answers
Why is rotation locking to an axis? 3 Answers