Download

Prevent LinetraceByChannel from hitting invisible component

Happy new year everyone!!

I stumbled over this a long time ago, but didn’t care about it. When I am performing a LineTracebyChannel I can hit actors or components that are hidden, even when I have set the trace channel to visibility.
I tried the same stuff with “hidden in game” instead of toggle the visibility but I still hit the actors.
So my question: Am I understanding the linetrace not correct or how can I prevent the trace to hit my components? The only solution I can think of is to add them to the actors to ignore, but the problem is, that I want to toggle the visibility of my components and I don’t want to change the “actors to ignore” list everytime I toggle them…

Cheers,
Evil_Fischi

sometimes on the forums, it’s hard to understand exactly what the issue someone may be having w/o seeing their complete setup or how specifically they may be using a feature in Unreal w/o screenshots &/or seeing their exact setup.

easiest thing that might help you is to ask if you have seen the recent training stream or to suggest watching it to see if it helps:
https://www.youtube.com/watch?v=2LP5shWCnhc

Hidden? → set collision to “no collision”
Visible? → set collision to physics or query or both (or custom collision channel)… whatever you want
imo only possible way to achieve this is through collisions

Try MultipleLineTrace, and get the first object that is visible