Bodies
Learning paths through this topic
Two players start a shared gesture from too far apart and the hands never meet
A handshake, fist bump or high five needs two bodies close enough that both arms reach. If the animation just plays, the hands pass through air or one body is dragged across the floor. Here is how to let both step toward each other fairly, and what to do when one cannot move.
Two players on one rope: the lighter one gets yanked, the heavier barely notices
A rope between two co-op characters sounds simple, and then it either stretches like rubber, stops one player cold against a wall, or snaps them together violently. Here is a gentle pull that grows with the stretch, a hard limit at the end, and a fair split of who moves.
Stop crowded units from spinning when other units bump them around
In a dense group, units are nudged sideways and backwards by their neighbours, and if the picture follows the real movement, they twitch, face the wrong way and moonwalk. This entry explains which direction the body should follow instead, and what to do when a unit has arrived or stands still.
Make a unit slow down and pivot on the spot when its path turns sharply
When units follow a path that bends, they either slide sideways while their body is still turning, or they stop dead at every corner. Both look wrong. This entry gives a rule that links walking speed to how far the body still has to turn, so corners look weighty without slowing the whole army down.
Make a soldier or turret turn the short way round, at a fixed speed
Tell a unit to face a target and sometimes it spins almost all the way round the long way, or twitches at the moment it arrives. This entry explains why angles on a circle trick simple code, and gives a turning step that is smooth, never overshoots and handles a target straight behind.
Make a cart or wagon follow its horse round corners with the right turning behaviour
A trade game needs carts that follow a lead animal, and the common ways to do it either let the cart slide sideways like a tray, stretch the pole between them, or cut every corner. This entry gives the simple rule that makes the cart swing round the way a real one does, and tells when the pair is bending too far.
Switch a unit between idle, walk and run without flickering as its speed wobbles
Units in a crowd change speed all the time because of slopes, queues and speed bonuses. If the walk and run pictures swap at one exact speed, a unit near that speed jumps between them. Here is how to separate the two switching points and how fast each clip should then play.
Add a body bob and sway to walking that fades smoothly when the character stops
A little up-and-down and side-to-side motion makes a walking character or first-person camera feel alive, but when it is tied to a timer it keeps bobbing on the spot, and when it is cut off at a stop the picture jerks. Here is how to tie it to the steps and let it fade.
Characters on a moving boat or lift do a walking dance or walk on the spot wrongly
On a moving ship the whole crew is travelling, yet most should be standing still, and the one who walks should step at the right pace. If the walk animation looks at the speed over the sea floor, everybody on deck is running. And a spinning platform is trickier still.
Spin windmill sails with weight, and never so fast that they seem to turn backwards
A mill that copies the wind speed every moment looks like a fan, and when the wind turns, the sails flip direction in a single frame. At high speed they can even look as if they turn backwards. This entry gives sails that have weight, brake before reversing, and have a speed that a screen can show properly.