I am trying to use the MagneticPinch script that Leap Motion provides in Unity to pick up objects.
I instantiated a LMHeadMountedRig that has a LeapHandController in it, I put the prefab into the scene so this was all set up. After I added the magneticPinch script as a component to the LeaphandController Object but when I run it I get the error:
NullReferenceException: Object reference not set to an instance of an object.
This error is at the line of code
Hand leap_hand = hand_model.GetLeapHand();
So basically it won't run since I cannot get a reference to a hand object.
Does the magneticPinch script work with the latest LeapMotion sdk? Since the scene examples used for it have completely different object structure in the scene.
How do I get grabbing to work?