Getting Rigidbody hooked to HingeJoint body instantly in Script

Hello guys,

I need to attach a ball with a hand’s Hinge Joint component through script. When I do that manually in the editor i.e dragging dropping ball node to ‘connectedBody’ field, the ball get hooked to palm of hand instantly. But when I assign the body in script, I don’t get the same behavior. Am I missing something?

Thanks.

i can only speculate based on the information:

  1. check if the object is positioned at the right (the ball just like your placing in the editor)
  2. Make sure you are adding the same components to the object when you are adding through script.

Thank you,
V.Vamsi Krishna