Download

Help! How do i determine multiplayer racing position?

I have been stuck on this problem for a few days, any help would be appreciated!

I added a spline system, determining the position of the player along the spline.
The first attachment below shows the player (Host) is 0.16% of completing the track(spline).
The second player is the connected client showing at 0.065% of completing the track.
The variable shown in the hud is replicated through the player state

My question is how do I go about calculating the player’s position based on their percentage? For example, the player with the most percentage completed would be in 1st place and so on. I can’t seem to figure out how to compare all the connected player’s variables.

Update: I have tried getting the playerarray from gamestate and therefore setting the index into an array

I then used a simple check to see if host is behind connected client, if so a printed message saying player has passed you. Im not sure if im doing this right

Help:(