Hi fellows,
I’m working on a kinect input implementation for jME3 that can be easily manipuled with the inputManager. It does work both for Windows, Linux and Mac as well. So I’ve uploaded a Kinect Game Template that can be downloaded via jmpThe jMonkeyPlatform, a full-fledged IDE with plugins for editing jME3 content and assets. Integral part of the jME3 SDK.-contrubutions repository http://code.google.com/p/jmonkeyplatform-contributions/downloads/list. As the project was created on jMPThe jMonkeyPlatform, a full-fledged IDE with plugins for editing jME3 content and assets. Integral part of the jME3 SDK. it can be opened on Netbeans or jMPThe jMonkeyPlatform, a full-fledged IDE with plugins for editing jME3 content and assets. Integral part of the jME3 SDK., if you want to use it on Eclipse or any other environment, just copy the “/lib” folder and add it to your project classpath. About the assets, it’s the same as for the BasicGame template. It was built by using the lastest unstable OpenNI and NITE versions, install details can be found in project root folder, it’s a README file. The usage is very simple, first you have to enable the kinectInput object via AppSettings (like the joystick input) :
settings.setUseKinect(true);
Then you register a kinect mapping of your choice via inputManager:
//add a "wave" mapping for listening to "wave" gestures
inputManager.addMapping("wave", new KinectTrigger(kinectInput.WAVE));
Then register a KinectListener to the chosen mappings via inputManager too:
inputManager.addListener(myKinectListenerImpl, "wave");
Then in your kinect listener you implement the onWaveEvent:
public void onWaveEvent(String name, NullEvent evt, float fps) {
//do whatever here
}
But first you have to perform a “click” or “wave” gesture to start the session. Once started, the kinect will start detecting your gestures
.
Usage details can be found in Main.java class inside the project src.
The kinect input is “Multi-threaded” updated by inputManager. It avoids low fps.
Here’s a test that I did on my windows 7 64. FPS not bad
:
EDIT: Oh! I forgot to say that it’s me controlling the standalone box with my hand movements
.
EDIT2: Oh. Also, there’s a book called “Killer Game Programming” where there’s chapters teaching how to create kinect applications in java by using the openni and nite libralies. Check it out http://fivedots.coe.psu.ac.th/~ad/jg/index.html and go to the “Natural User Interface (NUIs)” session.
-Glauco Márdano