Reaching into Second Life with Leap Motion

by Community Manager on ‎01-30-2013 12:08 PM

When our developers first saw the Leap Motion controller they couldn’t wait to get their hands on one. Thankfully, we were able to get a pre-production development kit and built demos to explore its capabilities in Second Life. The demos included tests of flight controls, object manipulation, and avatar gestures. 




This work was strictly experimental, but it showed the power of Second Life as a platform for exploring gesture-based interactions with controllers like the Leap Motion, and we’re happy to be able to share the code with you as a starting point for your own explorations.

If you have a Leap Motion controller and would like to experiment with the Second Life Viewer, you can find the source code for these experiments at http://bitbucket.org/simon_linden/viewer-rabbit. The indra/newview/llleapmotioncontroller.cpp file contains most new functionality. The Viewer is built to work in several different modes. These modes can be used to control the avatar while flying, send data into Second Life for scripts to intercept, detect hand motions that trigger avatar gestures, or control the camera and avatar movement. To switch between these modes use the "LeapMotionTestMode" value in the Debug Settings, accessible from the Advanced menu.

To give our experiments a shot you will need get the source mentioned above and contact www.leapmotion.com to join their developer program and obtain the SDK. Currently only Windows Viewers are supported, but other platforms could be added by linking in the appropriate Leap Motion SDK.