I have been pondering on some ideas on how to implement animation for my Cells game. Currently you can play character animations and as also blend them if I got it right. That's a good thing, but the drawback is that the character feet's tend to float over the ground and climbing footsteps is almost impossible to do. The alternative is having a IK driven character and write some IK solvers (some did I think) and then manage the animations that way. This will probably solve the problem and give some advantage like gripping things etc. The drawback is that you then cant use animations recorded in your external software.
I want both standard animations and IK for the legs at the same time. Standard animations as BHV is great, but then we have the problems with having the feet's touch the ground. My idea is to on each frame, after the animation has placed the bones(or joints) at the prerecorded positions, move the feet's in Y-direction so they actually touch the ground. The model must of course have the legs IK-rigged.
A Pseudo code for this could be something like
OnUpdateFrame:
// I assume the animation has already done its job here
// and the we have a handle to each IK-Leg-Controller (LeftLegController,RightLegController)
Find Y-position of LeftLegController
Find Y-position of terrain at coordinates LeftController.X & Z
Move LeftLegController.Y to TerrainPos.Y
Repeat for RightLegController
Run IK solver.
I have not though about the details so far.
What do you think guys and girls. Could this be something?