How do I go about getting the rank (1st, 2nd, 3rd, etc) of a vehicle in a racing game using blueprints?
I’m using splines for the race track. I’m trying to use the Get Distance Along Spline point, but I don’t know how to get the spline point based on the vehicle position.
Hi, Epic staff released a tutorial series for time attack, with a checkpoint system and timers. Tutorial
Take a look,
You can compare the checkpoints the vehicles have reached, and then compare the distance to the next check point.
That way, if someone missed a checkpoint, he will loose rank, and the other will be sorted like this: for each car, get distance from next checkpoint, then the smallest will be the best ranked
Yes I did. I used target points along the track. Each target point is arranged in order such that the furthest along the track is the one with the highest value. The vehicles select the closest target point to them. Using that, I can rank the cars with just a simple comparison between which vehicle has the target point that has the greater value.