Item Highlight Outline Issues

Heya folks,
I’ve followed this article: Tutorial – Creating outline effect around objects | Unreal Engine 4 blog and I got a pretty awesome result: http://i.imgur.com/5Kugi2h.png

Problem is - the outline goes over the flashlight in the foreground, which is a no-no… Any way to fix that?

Best regards,
Damir H.

Yes, you need to do a check between the regular scene depth and the custom depth. Whenever scene depth is lower than custom depth, the outline shouldn’t be rendered.

I did that and it works great… now for the “but” part - I’d only want the flashlight to overlap the outline, I like it going through other geometry in the scene… or perhaps, static geometry only…

Can you show me an example please?