I want top store my car Positions in an array so that i can use them to reset my carafter crash but i am unable to do this.
this is my code
Vector3[] positions = new Vector3[10];
void Start()
{
StartCoroutine ("CrashCheck");
}
private IEnumerator CrashCheck(){
while(n<10)
{
yield return new WaitForSeconds(1);
positions [n] = car [GameCOnstant.carNumber].transform.position;
n += 1;
}
n = 0;
}
when i debug my positions it alwasy display(0,0,0).