First, sorry my bad english, i’m brasilian. Well, i am creating a race kart game whith three karts , but i dont know like show the position cars during the race, like first, second and third. I think make way point for detect karts, but i dont know like do this. Thanks for all.
Make walls across the track (invisible + sensor physics type). Then you can check what collides with the walls in what order.
This will a least be very precise at the end of the track to determine the winner.
To check the relative position between two cars, you would need to measure the distance on the track. There are several options to do so.
check the distance to travel towards the end of the track
–> this can be tricky as it is usually not a straight line.
check the distance to travel to the next waypoint (measure waypoints with the walls as mentioned above.
–> allows you to use a straight line measure
–> you need more checkpoints as more the track is not straight
check the relative positions of the cars to each other.
–> it is easy to calculate, but very un-precise as cars might not follow the track.
measure waypoints with the walls as mentioned above
it might be a good idea to set the walls origins at the center of the racetrack.
Monster has many good ideas!
The precision of the timers will only be limited by the width of the track, the distance between sensors, and the amount of bad steering an object has, Bad steering means greater distance lost over time, but the timers will get updated with each sensor it passes, so the overall precision isn’t going to get worse as you go. More sensors means more precision.
How much would 100 sensors slow down game speed? 500? 1000?