I have this partially working already, but my implementation doesn't animate very well (lots of jitter, some random movements) and I thought that you guys in Game Development might be able to point me in the right direction.
- I have a "Listener" application that listens to updates from the Kinect, finds the object in the frame, and sends an update of that objects location. (I just care about x/y in my case, not the z axis)
- In a separate "Projector" program I listen for that update, and update the actual position of the object in my model.
- In the "Projector" program there is also a rendering thread, triggered once per screen update, that attempts to move the projected object smoothly along the path of the real object using that model. (trying to project the image on top of the real object)
The problem I need to solve is: How do I track the object's real location with my projected object in a way that animates smoothly?
The kinect updates the location at 30 FPS, the render cycle happens at 60 FPS (on a ui thread), but I'm trying to project on top of my object as best I can while keeping the rendered image moving smoothly. (right now it tracks with the object but jitters quite a lot) I came across http://gafferongames.com/game-physics/integration-basics/ on the RK4 algorthim, which is probably more complex than I need but I wasn't able to implement it correctly for my case. (likely because I don't fully understand it)