View Full Version : How to a display a gun shot

05-02-2005, 09:48 PM
Dear Programmers,

I want to render a gunshot when I press space bar
from a cylinder.I have already rendered the cylinder and when I press shots should get ou of the cylinder continously. Which primitive should I use.

void keyboard(unsigned char key, int x, int y)

case ' ':


05-02-2005, 11:58 PM
a textured quad or something similar

05-03-2005, 09:25 AM
...or a gluSphere if you want to work in 3D space.

05-03-2005, 03:55 PM
Well if you want to show a bullet, you could go with a cylinder for the body and a scaled sphere to draw the tip.

05-03-2005, 07:02 PM
theres no need for such a detail, taking into account hes not making a slow motion bullettimed demo about guns.... then I recommend you to use a textured quad to draw the fast trace of the bullet. you can see this on many games already if you have no clue of what im talking about...

but displaying a high quality bullet its pointless on a simple test or game.

if you do have bullettime and your time is freezing, then yes you will need to render bullets when bullet time is on. else you dont need such a detail because it wont be seen, bullets travels fast you know ;) .

but its up to your game.