This script will simply add a MRT card to the first recognized right hand with a pinch motion detected.
First linking the MRT card game object:
public GameObject MrtCard;
Secondly, activate leap motion, sense the pinch action and display or remose display of the mrt card.
Controller controller = new Controller (); Frame frame = controller.Frame (); // controller is a Controller object HandList hands = frame.Hands; Hand firstHand = hands [0]; float pinch = firstHand.PinchStrength; if (pinch >= 0.7f) { MrtCard.gameObject.SetActive(true); } else { MrtCard.gameObject.SetActive(false); } Debug.Log ("The grab strength is: " + pinch);