[General] IDEA: How to make position in race function?

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
The easiest way would be to define a path that your racing track follows.
Then loop through all racers and find the closest point on the path for each racer.
For any given point on the path, you can get the total length until the start/finish line.

Then you have a value that you can use to sort the racers.
Then you just have to apply some sorting algorithm to get the racers' positions in the race.
 
Status
Not open for further replies.
Top