I have a line trace emitting from the end of a gun and hitting a static mesh wall, but it only ‘hits’ the first side it touches and not the opposite side of the wall where the trace comes out. I’m trying some BP now that guesses the end of the wall using the wall thickness and hit vector and angle but it is overly tedious for different wall sizes, plus with that setup, how would I get the mesh normal location for spawning decals. Is there a setting or workaround I’m missing somewhere?
I did this recently just as a test, here’s what I came up with, though I haven’t tested it fully, it seems to work well.
Basically it’s doing a multiline trace first, getting the first hit point, then tracing backwards from the location of the second hit, or, if there was no second hit, tracing back from the end of the previous trace:
Thank you very much! I had some trouble at first because I was using a ‘multi-line trace by channel’ then a ‘line trace by channel’ which did not work because the multi checks for ‘overlap’ while the single line checks for ‘block’ and I had my trace channel set to overlap on the actors I was tracing through.
Now I’m using a ‘multi-line trace by channel’ on a custom trace channel and a ‘line trace by object’ on an array of two custom collision object types. I also tested ‘multi-line object trace’ for only using a single forward and backward line with lots of objects in between. Works very well so far with lots of ways to tweak and control stuff.