I had a code were when the line trace hits the AI it will create a hit marker and will damage the AI using apply damage. It worked before, I mean it worked several times and all the sudden just poof doesn’t work anymore and what’s surprising is that I think it has something to do with the AI’s collision since whenever the line trace hits something the rest of the line trace behind the actor turns green but after this glitch thing occurred it just stays red like it doesn’t count as a hit even when I literally see the line trace hit the AI, now can anyone please help me with this since I already tried several solutions like turn on “block” for both visibility and camera of the line trace on the collision presets but still it doesn’t fix it. Can someone pls help me?
You need to print the result of the hittrace, to debug it.
OK thx for the tip, but I sort of manage to replicate the problem to another computer so which means I might have a solution since I already know what the problem is(sort of haven’t tested in the real project) but if my solution doesn’t work then I’ll take your tip. By the way this is the problem:
I set the collision presets ofthe AI mesh to “overlap all” and I also set the visibility channel of the line trace to camera and because of that the line trace doesn’t hit the AI anymore