Tracing for a specific actor

Hey guys.

I have an outline materiel, and I want to trace for a hit to a specific platform in my game. If theres a hit, then set Render custom depth to true, if there’s no hit, set to false.

I made it work for the first hit, but cant seem to set the render custom depth to false after that, even tho im not aiming on the platform anymore. Anyone know why?

I think becose of using “event begin play” your line trace start only one time when u start playng, u should try “event tick”. Also u will have custom depth ON when u line trace component, but u need to get it OFF when u will not line trace it, or try to disable it after 1 sec. Then if u will looking on it 1 sec timer will be reset, and when u turn away timer will activate after 1 sec and turn your custom depth off