private void OnEject(int no)
 {
     if (keycardIn != null)
     {
         Destroy(gameObject.GetComponent <Joint>());
         keycardIn.GetComponent <Rigidbody>().AddForce(transform.forward * ejectForce);
     }
 }
    private void OnControllerDropObject(GameObject obj)
    {
        Keycard card = obj.GetComponent <Keycard>();

        if (card != null && card == objectInRange)
        {
            keycardIn = card;
            if (keycardInserted != null)
            {
                keycardInserted.Invoke(card);
                card.transform.position = targetTransform.position;
                card.transform.rotation = targetTransform.rotation;

                FixedJoint fx = gameObject.AddComponent <FixedJoint>();
                fx.breakForce    = 5000;
                fx.breakTorque   = 5000;
                fx.connectedBody = card.GetComponent <Rigidbody>();
            }
        }
    }