protected virtual void ObjectAttached() { GameObject obj = targetObject.gameObject; targetObject.ConnectedToHook(); targetObject = null; obj.transform.position = targetTransform.position; obj.transform.rotation = targetTransform.rotation; joint = obj.AddComponent <FixedJoint>(); joint.connectedBody = rb; }