How to wag a tail, part 2
Let's say we want to wag a tail. Like this:
How to do this? Just follow these simple steps:
1. Draw a base tail shape. Put it into a precomp.
2. Draw all inner details of the tail. Put it into another precomp.
3. Draw a Bezier line to use as a bone.
4. Calculate (u,v) coordinates of every vertex (x,y) and handle in all tail shapes, where u is t from [0,1] so that the distance between (x,y) and bone(t) is the smallest, and v is the d so that the distance between (x,y) and the normal at bone(t) multiplied by d and used as offset from bone(t) is smallest.
5. Cache the collection of (u,v) points in an array. Also remember the base length of the bone.