public void PickUpObject() { if (holdableObject != null) { handJoint.connectedBody = holdableObject; heldObject = holdableObject; originalLayer = heldObject.gameObject.layer; heldObject.gameObject.layer = 10; } else if (lever != null) { lever.Switch(); } }