- Home /
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?
Answer by tormentoarmagedoom · Feb 21, 2018 at 12:41 PM
Hello.
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
Your answer
![](https://koobas.hobune.stream/wayback/20220612152951im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to align the bottom of a GameObject with the ground? 1 Answer
Stop Children of Instantiated Parent From Offsetting After Changing Position 0 Answers
How do I make and object's position and rotation independent again? 1 Answer
Align line of units based on vectors 0 Answers
Help change Score text positioning using vector3 [C#] 1 Answer