Hi everyone.
I have set up the use of an ‘outline material’ that can be used on meshes to give them a highlighted outline - this works with post process effects and rendering custom depth. The only problem I have found is that when I apply this to a static mesh, the outline appears through walls - aka all over meshes. How can I stop this from happening? What I am looking to do is only have the outline visible when there are no objects blocking said mesh.
Thanks!
1 Like
You can’t. That tutorial shader is a screen-space solution, it renders on top of the frame rendered.
What you can do is trigger the outline only when a line trace hits the objects and not blocked by anything else, using collision channels.
Ah okay, I see thank you. So I could achieve this by changing the Collision Trace and Object settings in the Static Mesh’s properties? Something like this :
Yes, just make sure the trace isn’t blocked by any other object from any other channels then render the outline.