• Advertisement

Archived

This topic is now archived and is closed to further replies.

bullet hits on walls/windows how to?

This topic is 5777 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! Im wondering how do they make bullet hits apear on walls and windows like in Counter-Strike or other FPS games ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
"Decals"; this is what you are looking for.

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

Share this post


Link to post
Share on other sites

  • Advertisement