private void AttachRopeToBalloon(GameObject pBalloon, Rope pRope) { HingeJoint2D balloonHinge = pBalloon.GetComponent<HingeJoint2D> (); balloonHinge.connectedBody = pRope.GetEndOfRope().GetComponent<Rigidbody2D>(); balloonHinge.connectedAnchor = new Vector2 (0, pRope.GetLengthOfEachSegment()); pRope.transform.parent = pBalloon.transform; }