I’ve been working on a first-person shooter game with Bullet and OpenGL, and now have it to the point of being able to fire bullets through the scene. I’m now looking to draw the path these bullets take, from starting position to their ending position, with the entire path staying drawn until the next bullet is fired (so that the screen isn’t cluttered).
I’m basically just looking for something like a red line that extends to the bullet’s new position each frame, or something like that. So, by the time the bullet has gone from the gun to its final stopping place, the red line will show the exact path it took, what it bounced off of, etc.
I’ve tried looking for examples but I can’t find anything useful. I’ve seen mention of leaving a trail behind an object using an accumulation buffer, but that’s not really what I want.
How can this be done? Does everyone know of any examples or tutorials for this?