Hi, im trying to implement a race position keeper by using checkpoints and calculating wich player has the less distance to complete the track. But im having a problem in the logic that i can’t seem to figure it out.
If there are 4 players and say you go 4th the position shows you are 4th ok. but as soon as the other 3 cross the finish line their distance to complete the track is larger than your that are about to cross the finish line making you 1st until you cross the line and you’r back in 4th place.
So how do i logically solve this?
Store a lap number. ![]()
hmm nvmnd, I solved. I multiply the track lenght by the number of laps and then the position is calculated from who is closest to complete all laps.