How do I create an array of position vectorers to the player?

I want to track the players last ten footsteps, and then put a gameobject on these coordinates. However, I’m not sure how I can make an array with these coordinates?


I recommend to create a 10 positions array with 0,0,0

Then make a loop that replace one of the elements with the actual position. when the 10th position is recorded, restart the loop with the 1st element. This way you wil lbe sotring last 10 positions.

Every time you replace a position in the array, you should put the gameobjects again