players positions when race ends.

i have no idea how to create this, so can anyone help me? i have done everything exept this :frowning:

Make a Trigger, when the player enters save its position.

Also, if you know when the race end why not just take the player.transform.position there?

u can save the game objects in a variable when they enter the trigger.

   public var position : GameObject[];
        var cont : int = 0;
        function OnTriggerEnter(hit : Collider){
           position[cont] = hit.gameObject;

remember to assign the number of positions in the inpsector.

If you want to know the positions of the “players” of your race you might want to have a variable that inrements during your race with the distance they move (relative to the circuit shape). At the end you compare the values and you’ll know each player position. Is that what you want ?

i only want know who win when race ends. i think first answer is correct, but i dont know how to save its position