So I'm trying to place a Kinect driven model on a known ground plane such that his feet do not go below the ground. I'm using the Kinect SDK sample setup, the Dude.FBX model, and using the SkeletonJointsSensorOffsetCorrection class to move the model off the floor based on the Kinect sensor floor plane. This works pretty well and allows me to jump, which is pretty important. However, when I bend my knees to squat down a little, the model applies a constraint filter to prevent the joints from bending too far. This meas that the hip moves down properly, but the model's legs don't bend all the way like mine are, so the feet clip through the floor (since they have to go somewhere.)
What I want to do is alter the positions and rotations of the model's feet/knees after all other filters are run so that they don't go through the ground plane. However, I'm stuck on two points:
- How do I ask the model (not the Kinect Skeleton) if it's feet are below a certain Y?
- How do move the feet up to 0 and rotate the knee and hip joints to be somewhat natural (again, on the model, not the Kinect Skeleton)?
The Kinect Skeleton is correct. It's seeing everything in the right place. But the model interprets that info in a way that I want to adjust after the fact. I just don't know the best way to go about it. Any ideas?
Thanks, everyone.