Download

Best way to show bullet impact holes

Hi there

I am trying to figure out the best way to show bullet impact holes on a mesh, but am struggling to find any tutorials or information which provides information on the best way to set this up. This is my challenge, my character uses a revolver, rifle and shotgun, except for the shotgun both other weapons will have a scope. Now, I would like to show some “bullet scatter” if the player is not aiming at a NPC and misses, for example perhaps they are hiding behind wooden crates so I would like to show some impact holes appearing when firing at the crate.

Can anybody point me in the right direction where I might be able to find more information on the best way to approach this?

Thanks

I would think you could use a blueprint to place decals on the objects that get hit. I see there are a couple bullet impact decals on the marketplace.

The high level idea is pretty simple:

  1. gun fires a ray trace when gun fire function is activated
  2. if ray trace hits something with collision, get the hit location, angle, whatever data you need to get, etc.
  3. use the data collected to spawn a decal (with a texture of a bullet hole/dent/scratch/impact) at the point of impact
  4. create an enum with a set of potential material surfaces, so that if the object hit was wood you get a wood impact texture decal; if you hit metal then you call up the metal impact decal, etc.

That’s pretty much all there’s to it, from a high level point of view. To get it all to work, you’ll need to script it all in Blueprint (or C++ if you prefer that…)