- Home /
How can make rank in racing game?
I went to make a racing game, but I don't know how to make rank in the game, please look picture
And the GUI will show "3rd"
But I don't know how to detect the player is 3rd
Can anyone help me? Thanks!
Just an idea, never done this before, maybe make empties at every corner and check to see how close every car is to them. You'll have to make it so that once the cars pass one of the empties, you will need to use the next one in line. The car closest to the farthest empty is first and so on. I just got that off the top of my head by the way, so it might not work.
Answer by Joshua · Aug 21, 2011 at 05:19 AM
Either use checkpoints or check if they are behind eachother, which means it won't work if you're facing the wrong way.
Then use a lot of waypoints. It's the only way to know if they're further along the track. It may sound inefficient but it's really easy to set up. Write an editor script that shows a little gizmo for every waypoint and a line in between all of them. Then add a button to add a new wp. Add 50-100, place them correctly, and see who is nearest to what is currently the furthers waypoint.
you don't have to Update the rank everytime just check is the variable changed.