I am developing a game using greenfoot and kinect. The theme of the game is to catch the falling apples with the basket.The basket movement should happen via kinect. The problem is I am not getting tracked by the kinect.
UserData user= world.getTrackedUser();
GreenfootImage image1=world.getThumbnail();
System.out.println(image1 +"image");
System.out.println(user+"user");//here i am getting it as null
if(user!=null){
if(user.getNearestJoint()==Joint.RIGHT_HAND)
{
Joint rightHand= user.getJoint(Joint.RIGHT_HAND);
getImage().drawImage(image1,rightHand.getX(),rightHand.getY());
}else
if(user.getNearestJoint()==Joint.LEFT_HAND){
Joint leftHand=user.getJoint(Joint.LEFT_HAND);
getImage().drawImage(image1,leftHand.getX(),leftHand.getY());
}