1
How to Run the Example
1. Download and install OpenNI 2 and NITE 2, as described in the next section.
2. Open scene ‘KinectAvatarsDemo’, located in Assets/AvatarsDemo-folder.
3. Run the scene. Move your body and see how the avatars and the cube-man reflect your movements.
Both avatars are automatically connected to the 1
st
player in the example scene.
4. Use your left or right hand to control the hand-cursor on the screen.
5. Try one or more of the suggested gestures and make sure they are detected correctly.
6. Stop the scene. Enable ‘Compute User Map’ and ‘Display User Map’-parameters of KinectManager –
a component of ‘MainCamera’ in the example scene. Then run the scene again.
7. Open and run ‘KinectGesturesDemo’-scene, located in Assets/GesturesDemo-folder. Use hand
swipes – left and right - to control the presentation cube.
Installation of Kinect or PrimeSense sensor with OpenNI 2 (Windows)
1. Download and install OpenNI 2, 32-bit version. Here is the download link:
http://www.openni.org/openni-sdk/
2. Download and install NITE 2, 32-bit version. Here is the download link:
http://www.openni.org/files/nite/
3. The drivers for Kinect and PrimeSense sensors are installed during the OpenNI/NiTE installations.
4. Connect the Kinect or PrimeSense sensor to a USB port of your computer.
5. The OS should find and use one of the previously installed drivers. You should be able to see the
installed sensor under the PrimeSense-section in Control Panel/Device Manager.
Installation of Kinect or PrimeSense sensor with OpenNI 2 (MacOS X)
1. Download and unpack OpenNI 2, OS X version. Here is the download link:
http://www.openni.org/openni-sdk/
2. Download and unpack NITE 2, Max_OSX version. Here is the download link:
http://www.openni.org/files/nite/
3. Open /etc/launchd.conf (create the file, if needed) and add ‘setvar OPENNI2_REDIST ’ + the absolute
path to Redist-subdirectory of OpenNI2 package. Add ‘setvar NITE2_REDIST ’ + the absolute path to
Redist-subdirectory of NiTE2 package.
4. Restart your Mac. The new environment variables will be set during the start-up. Run Terminal-app
and type ‘set’-command. The new environment variables should be displayed in the console.
5. The drivers for PrimeSense sensor are present in the OpenNI2 package, so you won’t need to install
them explicitly.
6. If needed install libusb 32-bit: ‘brew install --universal libusb’. At this point, if your sensor is
PrimeSense, just connect it and the OpenNI2-Unity example should work.
7. Kinect only: Install libfreenect: ‘brew install –universal libfreenect’.