Line trace issue in a TPS

Hello good people of UE forum,

I’m facing an issue with a line trace by channel in a TPS i’m trying to make for learning purposes.

So I want to avoid people being able to shoot while being behind a wall, so I have a line trace setp up from the camera to find the impact point of the crosshair and one from the muzzle to the impact point of the first one.

For some reason, sometimes the second one just doesn’t hit, the line trace stop before the impact point it seems, I tried debugging by printing the vectors and the first impact point is correct but the second one wil go 0,0,0 on the missing hit.

I’m probably missing something obvious but I tried several stuff to have it work that way and it just doesn’t work and I have no idea why the second impact point is not the first one on some shot…

If any of you have an idea that would be greatly appreciated.

Thank you and sorry for the bad english, not my first language !

If you do not hit anything, it is normal for the result to be 000, In this case you could check the return value, and calculate a different end with a straight line