Imagine a flat 2d puppet that looks like a skeleton that moves as you do with a kinect - im not after 3d data just literally if the arm rotates then rotate the skeleton on the screen the correct way.
I have Images for each of the body parts but i cant get them to rotate correctly.
PVector LHposition = new PVector();
context.getJointPositionSkeleton(userPuppet, SimpleOpenNI.SKEL_LEFT_ELBOW, LHposition);
PMatrix3D LHorientation = new PMatrix3D();
float confidence = context.getJointOrientationSkeleton(userPuppet, SimpleOpenNI.SKEL_LEFT_ELBOW, LHorientation);
//
pushMatrix();
translate(LHposition.x, LHposition.y, LHposition.z);
applyMatrix(LHorientation);
// draw lines x, y, z
rotateY(PI);
stroke(255, 0, 0);
strokeWeight(6);
line(0, 0, 0, 150, 0, 0);
image(armL2,0,0);
popMatrix();
This gets me close and the red line drawn is correct - the correct way and rotates right but becuase its 3d the image is also drawn in 3d and i only want to constrain to 2d so the image often doesnt get drawn right.
I guess i am trying to replace the inbuilt drawLimb with drawImage ! Maybe its a feature request