Animating snake along a path

Hello, would plz smbd explain how to animate a snake along a path? The snake has to follow the pass with its whole body smoothly tracing the curves, it’s already rigged and ready to go :yes:

Aha. I was talking with a friend of my about just this topic today. Here’s what I came up with:

http://dl.dropbox.com/u/180363/SnakeRig.blend

Basically, it uses two curves, one target curve and one “IK curve” that is basically a single straight curve subdivided a few times. The IK curve gets a curve modifier that deforms it to the target curve (be sure to turn on “Apply on spline” one of the little icons in the modifiers options), and then the rig uses a spline IK constraint to fit it to the IK curve. Offsetting the IK curve shifts it down the target curve and allows the snake to follow along the target curve, and the IK curve can be further edited and deformed to provide secondary animation.

http://img12.imageshack.us/img12/1821/expy.jpg