public void CloseHook(Load hookedLoad) { hookedLoad.transform.position = transform.position; //center load on hook m_fixedJoint = gameObject.AddComponent <FixedJoint>(); //creating the joint m_fixedJoint.connectedBody = hookedLoad.GetComponent <Rigidbody>(); //attaching the load hookFree = false; m_currentload = hookedLoad; m_loadCanvas.HighLightLoad(m_currentload, true); hookedLoad.CreateDropZone(); }