- Home /
How do I enforce the limits on a hinge joint 2d?
I'm attempting to create a spider with realistic physics. In the process Ive noticed the hinge joint limits don't function properly. I think I've got it setup correctly but when I play the game the limbs easily pivot beyond the limits I've designated.
Any suggestions?
This is from memory, and the last time I did it there wasn't that green cone area, but I remember the limits as being from 0. For example, +30 and -30, no matter what starting angle the joint has.
All-in-all, joints are about the least documented parts. I assume they came from PhysX that way.
Thanks Owen-Reynolds! I tested your advice and sadly it didn't work. I'm confident I have everything setup correctly, that the issue lies with the joint mechanics as they are in their default state. It would appear there are no readily accessible solutions if any at all. but I've seen functional what appear to be mutli-object/ skeleton based characters in unity games before. There's definitely a way to do this.
Answer by courtesy · Apr 06, 2020 at 09:48 PM
So I built the hinge joint improperly. In the picture a green line is visible in the vicinity of the highlighted joint perpendicular to the relevant limb. that green line is actually what represents the current rotational position of the relevant limb: i.e the limits need to orientated around that green line, not the limb itself. I feel silly for not getting it sooner, but that was actually a roadblock for me for months.
Your answer
Follow this Question
Related Questions
HingeJoint2D anchor point disappered 0 Answers
Is anyone else having problems with Unity freezing when you try to close the program? 0 Answers
can i insert an image to be the background of my 2d game if so how ? 1 Answer
Drag and drop Word game 1 Answer
2d make sprite "bobble" on the Y whilst using velocity on x 1 Answer