Racing game position ranking?
I am trying to figure out a way to rank the player and the AI racers to find out who wins each race and which position they come in. My first thought was to use a spline and find the player and AI location on the spline, but I'm not sure how to:
1) Get the locations along the spline and 2) How to compare the location of 4 pawns to each other (with 3 possible player pawns)
How would I go about figuring out where each player is on the spline, compare it to the AI vehicles and then rank each vehicle on the HUD?
asked Mar 15 '16 at 03:12 PM in Blueprint Scripting
Hey, I know this is late but just in case anyone else is still looking for a way to do this still:
You can create a system where it'll create player race positioning based on actual world position and then just deduct those coordinates from the finish-line world position and then its a matter of setting up a few checks Using "value < greater" Or "Less> Value" that determines the players position. Now this may get weird if the level is windy or overlaps itself (you'd have to account for these things and make the system more complex that what I had initially explained)
Example - 3 opponents begin on same start line, they all have the same finish line, the distance between the finish-line and the start line IS what determines the players position
answered Nov 07 '18 at 11:09 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here