   Inverse kinematic animation
  I'm not sure if this is the best place to post, so I won't be offended if it gets moved.I was wondering if someone could point me to a high level overview of how inverse kinematics works in games, along side animations. For example, consider the problem of having a unit's feet conform to the terrain - do I just have keyframes marked with "this foot should be touching the ground", update the model's skeleton and then solve the system to so that the foot is touching the terrain? Or is there a better way to do this?I'm trying to implement this in 2D, I have an IK solver written already, I just am not sure what the best way to integrate it with my skeletal animation system would be.Thanks in advance.   
  One place this is used in modern games is in some shooters.What they will do is place and point a rifle so that it's aiming where the player is aiming, and then from there they will use IK to make sure that the arms are in the right place.This is one of many ways to aim a gun for a player, but it's one place I know some people use IK (:   ;  I think you have the basic idea. I'm not sure which areas you want more details on.I believe it may work something like this. The animation will drive the legs in a path as if there were no obstruction. Every frame the feet ray cast or shape cast up and down through the map to find their obstruction height. The foot position is raised up this height and the chain solved.A human limb is pretty easy to solve analytically especially if your only constraint on the ankle is that it be flat on the surface (otherwise the chain is likely not solvable, try to put your foot on the ground backwards). You can treat the upper leg and lower leg as a triangle in polar space. Then the ankle transform is just what ever delta is necessary between the lower leg and the terrain.;  I think that's what I was looking for, bzoom. I'll see if I can get it working this weekend, post an update here. Right now the legs on my models are made up of three bones - upper, lower and foot, so I'll see if I can have some success. I was thinking of solving the way you described - ankle up - and then solving the foot after, as it's not really important if it's clipping.   ;  Consolidating bzroom's suggestion further, you might find the description of the approach taken for the UE3 useful.   ;Quote:Original post by dmatterConsolidating bzroom's suggestion further, you might find the description of the approach taken for the UE3 useful.Woah, thanks. Do you know what they mean by 'animated ground height'? Is that just the height of the ground within the animation file?   