I'm creating a game where when an enemy gets within some distance of the user's right hand, the enemy is killed. I am using a Kinect.
That is what I was working with, I'm not sure how to make the transition from this code to the code that finds enemies in range of the right hand.
public void act() { PaintWorld world = (PaintWorld)getWorld(); UserData[] users = world.getTrackedUsers(); for (UserData user : users) { Joint rightHand = user.getJoint(Joint.RIGHT_HAND); { if (getObjectsInRange (100,Zombie.class).size() > 0) { getWorld().removeObject(this); } else if (getObjectsInRange (100,Zombie.class).size() > 0) { h = h++; getWorld().removeObject(this);