Guys, is there a way of detecting these overlaping decals so i can delete them?
How would i do that?
asked Jan 13 '19 at 02:58 PM in Blueprint Scripting
How about not creating the decals in the first place? In the gun you probably know where the last bullet hit. You can maintain a list of last N hit positions. Before spawning a decal you can go through the list and if the current hit has at least M existing hits "nearby" (each closer than D units) then you don't spawn it. With some quick dust particle system indicating the impact each hole-clump should look fine.
Of course this is just the base idea, you'll probably need to store hit normals too to avoid false positives near corners, you can also have finer control over the spawning by calculating a spawn chance based on neighbour distances. And obviously this method would be less helpful if multiple guns fire at the same point but I don't know if that's an actual use case.
answered Jan 13 '19 at 03:23 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here