When the Linden Lab developers first saw the Leap Motion controller they couldn’t wait to get their hands on one. Thankfully, they 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 they are 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 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 your 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.