I'm reading Ian Milligton's book on AI in the game
On page 150 he introduces the drift offset.
I do not understand how it works:
1) Imagine I have a formation with 2 possible positions (relative to the anchor): (-1, -1) and (1, -1)
2) The drift offset calculated from this information is (0, -1)
3) My anchor starts at position (1,0), has no speed and is in the center of mass of my formation
4) So if I follow the algorithm, my slots are (-1,1) and (1,1).
5) My anchor will stay at (1.0) as this is the center of gravity of the formation
6) I add a new slot (0, -2)
7) Follow the algorithm, drift offset is (0, -2). New slot position: (-1,2) – (1,2) and (0,0)
8) The anchor point is at (0.4 / 3), so it moves
As you saw, when I was doing the algorithm, when I understood my anchor drift, do you know what I'm doing wrong?