bullet hits on walls/windows how to?

Started by
3 comments, last by russian-bear 21 years, 11 months ago
Hi! Im wondering how do they make bullet hits apear on walls and windows like in Counter-Strike or other FPS games ?
< There are no stupid questions, only stupid answers! >
Advertisement
Just calculate an intersection between the ray that describes the bullet, and a polygon. One way of making the hits actually leave marks on the wall would be to insert the hits in a texture, and blend that with the walltexture.
I''m sure there''s faster ways, but this seems to be the easiest =)



--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
Iv heard it can be done with sprites but how do you make a sprite texture stick on the wall ?
< There are no stupid questions, only stupid answers! >
tok_junior said already.

The bullet must be travelling in a straight line. Calculate where that line hits your wall polygon and draw a little polygon there.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
"Decals"; this is what you are looking for.

This might help http://www.flipcode.com/tutorials/tut_decals.shtml

This topic is closed to new replies.

Advertisement