PDA

View Full Version : How to a display a gun shot



iris_raj
05-02-2005, 10: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)
{
switch(key)
{

case ' ':
emitshot();
break;

}

powerpad
05-03-2005, 12:58 AM
a textured quad or something similar

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

dvm
05-03-2005, 04: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.

bansheeogl
05-03-2005, 08: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.