One way hinge joint
Hello!
I'm trying to have an hinge where the forces only goes one way.
I'm having a game where you have a ragdoll dummy in space. I have his arms linked to his torso with an HingeJoint2D.
When I want my arm to point in a certain direction, I apply a TargetJoint2D on the tip of the arm, which turns the arm toward the direction.
But, when I apply the force to the arm, the torso also move, with the whole body. I end up with a dummy in superman pose toward the object.
Is there a way to have a HingeJoint where the anchor doesn't affect the Rigidbody(torso) it's attached to?
Answer by M0N0W0RM · Aug 06, 2020 at 04:58 PM
Try setting the connected body of the HingeJoint2D to None, then calculate the connected anchor position manually using a script. The script would calculate the connected anchor position using the position and rotation of the Torso. Such a HingeJoint2D would not affect the Torso at all (as desired), but would still move the arm relative to the Torso.