Magnetic Pinch with Leap Motion Orion

And why it is nearly impossible (yet) to throw things in VR like you do in real life.

With the original Leap Motion SDK came the Magnetic Pinch, a script that allowed to grap an object closest to the hand so you could throw it around. You can still get it on Github. Yet, with the new Leap Motion Orion (it’s a pretty good option for VR hand tracking. Go check it out!) the script is no longer working. The closest you will find in the latest release is a Pinch Detector, however, it does not allow to select single objects, nor throwing them around.

Image for post
Image for post
Throwing a sphere in VR

What does it mean to throw objects in VR

See what I mean when I talk about throwing things around:

Image for post
Image for post
Grabbing an object and throwing it in VR

Let’s get to the script

As you can see, throwing objects in VR comes with quite some limitations that have a major impact on the experience. Whatsoever, if you want to try it yourself, go ahead. In Unity, add the script below to your right or left hand and have fun doing some toddler-trowing. The magnetic pinch is very easy to implement and doesn’t do your VR-happiness any harm. However, the throwing aspect does, i’m afraid…

Felix Noller is a Human Factors Researcher, Interaction Designer and Tech Enthusiast, working and exploring at Method Inc in London.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store