- Home /
Why do my hinge joints 2d not work when they are first loaded?
I have a ragdoll character that is built up of different gameobjects that are connected with hinge joints (this is 2d btw). My objects are set up as the following: the body is the main object and all other parts (head, arms, hands, legs, feet) are children to the body. the body is the only object with a collider (polygon collider 2d). when I start my project my character falls and the body collides with the floor I have, however the rest of the limbs dont rotate around the joints like they are suppose to. They do however rotate if I drag the body a tiny bit with my mouse in the scene window. Once I click it with my mouse all the joints behave like I would expect them to. I dont have any scripts attached to any of these objects. Am I missing something to make the joint behave correctly on start?
Thanks a million for all the help as I have been wracking my brain trying to get these joints to work.
Answer by ProGrahamCracker · Sep 17, 2014 at 01:33 PM
SOLVED! Turns out that the object that I am attaching to the joint needs to have some type of a collider or it will not work. At least that is how I got mine to work. Since I don't want the objects to really collide with anything I just made the colliders triggers and now it works perfectly. Although if anyone else knows a better way, I would still appreciate suggestions.
Your answer
Follow this Question
Related Questions
HingeJoint2D.jointAngle flips between two values based on rotation 0 Answers
2D Physics: How to have a character "grab" onto wall with hand 0 Answers
Unexpected behaviour with Fixed Joint 2D 0 Answers
I want my 2D character to fall down as chain after he dies 1 Answer
2D Character should drag circles behind him as if they were collected by a string 1 Answer