Hi,
I have a set of sprites that follow a pathfinding route, mimicking automatically going along a race track. One of these sprites is the Player (Yellow) while the others are all CPUs (Red).
I would like my game to work out which CPU is the next one in front of the player so that I can attach a sprite to it (For draft purposes). I have tried by picking the nearest CPU object but i'd like it to be clever enough to ignore any CPU objects which are behind the player (No matter which direction the sprites are travelling).
Any ideas?