4 ms·
You can use sin/cos to drive leg animations procedurally. This works particularly well with things like arachnids. Use one value to drive the forward/backwards
by nineteen999 7y ago
You can use sin/cos to drive leg animations procedurally. This works particularly well with things like arachnids.
Use one value to drive the forward/backwards motion of the leg. Use the other to drive the up/ down motion of the leg, although you want to clamp the range from 0.0 to 1.0 so the foot doesn't clip under the floor (although you could use realtime inverse kinematics to prevent that as well, in a game engine with reasonable IK support such as UE4).
You'll also need to negate the values for the leg on the opposing side of the body, and keep flipping those values for each pair from front to back (ie. the third pair matches the first pair, the fourth pair matches the second pair).
See https://www.youtube.com/watch?v=GtHzpX0FCFY https://www.youtube.com/watch?v=GtHzpX0FCFY for an example of a (hand) animated spider gait.