I was trying to find a bug regarding a line of sight check with enemy AI when I stumbled across a very odd … bug?
Not trying to blame the engine (god no, UE4 is amazing), but I just couldn’t get a single line trace to hit a moving object (character actor).
After doing some research in the answer hub, it really seems like a bug in the engine that causes this, because quite a few other people also couldn’t get it to work and they all suggested some work-arounds to avoid this method entirely.
But seriously, this should be such a simple thing, I’m probably not reading that correctly, it’s a misunderstanding and or I’m just doing something wrong here.
I’ll attach my setup in a picture and believe me, I’ve tried all day to figure out why this simple line trace for object doesn’t work (also line trace by channel doesn’t work here either).
What I’m doing here is a simple “Line Trace for Object” and all the objects I’m looking for are of type “Enemy”. But it never hits anything. When I change the type to anything else, it works. Also if I change the type of the enemy back to the original “pawn” and try a line trace for that, it also doesn’t work.
Also changing Trace Responses to Block still doesn’t change anything.
I always get false.