Motion capture with Kinect
With the ease and availability of a high-quality motion capture device, such as the Kinect, close at hand for many people, it seems only sensible to apply some of its impressive horsepower towards solving one of the common problems of game development: the collection of realistic animation data.
This recipe will illustrate how to communicate with a Kinect device so that you can do anything from capturing your own body movements for character animation in a forthcoming game or as a basis for capturing player's movements in released games.
Getting ready
This recipe assumes that a Kinect device is attached to your PC and the Kinect for Windows SDK is installed. As the SDK was in beta at the time of writing, there may be some small differences between what's presented here and the preferred method of operation in later API, but hopefully the overall concepts will still be evident.
The SDK can be found at http://www.kinectforwindows.org
A texture to indicate the position...