So far I have been able to make the ball fly, bounce, and roll, while displaying the position and velocity.
Now I want to be able to see the ball path (similar to images below), in order to check the whole ball movement.

My code updates the ball position at a fixed time interval. I am thinking of:
1) using these position,
2) insert them to an array of VertexPositionColor[],
3) and draw them using GraphicsDevice.DrawUserPrimitives<VertexPositionColor>() method
but I have no luck so far, the VertexPositionColor is static array, while the amount of position data is always increasing.
I am thinking of using List<VertexPositionColor>, but the GraphicsDevice.DrawUserPrimitives<VertexPositionColor>() method refuse to take that as an input
protected override void Draw(GameTime gameTime) {
trail_vertice = new VertexPositionColor;
trail_vertice.Position = Position;
trail_vertice.Color = Color.Black;
trail_amount += 1;
trailList.Add(trail_vertice);
basicEffect.CurrentTechnique.Passes[0].Apply();
graphics.GraphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.LineStrip, trailList, 0, trail_amount);
}
I do not need an advanced effect like using particle engine. Just a single line is enough. Any suggestion?
Thanks in advance







