Line Trace damage with gun not damaging enemy

Hello. I have set up an enemy ai and i am trying to do line trace damage on that enemy with a gun. However, when i do so, the enemy does not take any damage even though i have everything set up. I have attached images below to show


Can you show us the code for Apply and Receive damage?

Hello. thank you for replying. I have edited it to show you a screenshot of the damage system with the linetrace for my gun. if there is any more i can show please tell me

Does LineTrace hit your actor? Do Debug Draw

please how do debug draw

image

Okay thanks. And please how would i know if it has hit the actor

It will show red square on point of impact

it shows a red square but not on the actor/ enemy. the line trace seems to be passing through the actor/ enemy

That means it doesn’t hit your actor, you need to check that your actor can block cannel that you are using for a line trace

oh okay. please how would i go about that

First of all, what channel are you using for a line trace.

Second, you can check channels in Collision on the component you want to hit.

1 Like

this is the line trace i am using for the gun damage

for the collision for the capsule is there a specific one i will need to change

You are using visability, so you need to block visability.

okay. when i hit the visibility, it gave me a drop down and the other option was camera.

Oh okay i had to go to the collision of the actor/ enemy, and i had to block visibility in collision presets, like you said. It is now working. Thank you for the help