Search Unity

HingeJoint2D Chain attached to Animated Object

Discussion in 'Physics' started by Sydious, Feb 28, 2015.

  1. Sydious

    Sydious

    Joined:
    Apr 1, 2010
    Posts:
    172
    I have created a Character Game Object using the "Sprite Rig" method. This object uses animation for Idle , walking... ect.

    I have created a chain using HingeJoint2d. This chain looks and behaves correctly when have it attached to the world space.

    I attached the chain to the hand sprite of the character object by making the hand a Kinematic Rigidbody2d. This doesn't seem to work as the chain separates and goes all over. I attempted adding a Distance Joint 2d to the last link in the chain, but all that did is keep the chain together, but all the links are spinning and not really connected any longer.

    Browsing the forums and Google I have gleaned that moving the chain parent object can cause this. I assume the animation movement is causing this.

    Is there a way I can achieve this using the HingeJoint2d chain or do I need to animate the chain instead. I would really like to use the physics method as it will provide a better chain effect.

    Anyone know what I must do?