Fruit flies calculate the difference between the direction they are headed and the direction of their desired destination, and use this estimate to guide their next move.