Hello,
I’m trying to figure out the logic for grabbing older elements of a List (array).
I have an array that stores a gameobject in repetition. For the sake of argument, let’s say it stores a game object every frame for up to a total count of 7 frames. So the 7th frame is stored on array[6] and the 8th frame would overwrite the object at array[0].
How would I grab the 3rd and 6th oldest elements given the current index of the current element being written?
so say current index of the current frame is storing into index 2 (array[2]), the history would be index 1, 0, 6, 5, 4, 3. So how could I calculate that I would need array[6] and array[3]?