Line trace for decal/material?

This is just a quick one.

I’m wondering…Is there is a way to do a line trace to find a decal object?
Or even just getting a material from the surface it hits.
I know there is “Get Phys Mat” but I’m not too sure that will be too useful.

I have a cleaning utility which cleans up decals (much in the same way that is done in Viscera cleanup detail), however I can’t find a way to get a decal from the hit of a trace.

If all else fails, what I will have to do is create a cleanabledecal blueprint or something along those lines with a collision box with a channel trace specifically for cleaning utilities. It’s not really an idea method, but…as I said, if all else fails :stuck_out_tongue:

1 Like

So I ended up creating a CleanableDecal blueprint, which contains a blueprint, and a collision box.

I created a custom trace channel called “CleanTrace” and the collision box blocks the CleanTrace.
There is an event called “Clean” inside of the CleanableDecal

The cleaning item itself does a single line trace.
Then it also does a multi channel sphere trace at the impact location of the initial line trace with the CleanTrace trace channel selected. I then iterate through the array and cast the hit object to the CleanableDecal object, from which I run the “Clean” event which does visual/logic stuff before destroying the actor.

It still doesn’t really resolve the question, but if anybody is wondering…that is what I ended up doing for now.

1 Like