Following another object is one of the most basic movement behaviours an item can exhibit – both in the real world, and in games.
There are many different ways in which objects can follow each other, and depending on the circumstances, different kinds of movement may be appropriate.
Today we will look at one particular kind: A number of objects following another in a trail at regular distances. The movement found in games like Snake.
However – unlike the original Snake and many of its spin-offs – we will neither constrain ourselves to a grid, or to fixed time steps.
Instead we want our solution to follow arbitrary paths with arbitrary accuracy.