(UE 4.27) How to make a trace only detect collision type when not detecting any other collision types

Basically im trying to make an enemy be able to see and the way im doing that is by casting a trace thats constantly looking at the player and if the trace can hit the players collision type without hitting any other collision types like “World Static” and “World Dynamic” then it would register as seeing the player and allow the enemy to start the attack sequence. Anyone know how to do this?

Any helpis appreciated and apologies if the response is late. I will reply when i remember to check

1 Like

You could use custom collision channels

but also maybe save yourself a lot of time, because AI sight already does this