Line Trace doesn't hit everytime

Looks like some of the traces end just before hitting the wall. I assume this is caused by “Get Hit Result Under Cursor by Channel” returning a location that’s ever so slightly offset from the wall.

You can confirm if this is the case by either un-possessing the character in editor image or enabling debug camera and looking inside the wall to see if the traces that didn’t hit are there or not. If all the Traces inside the wall are green, you can confirm this is the issue.

If that is indeed the issue, a possible fix is to extend the End input a bit into the wall. You can do this by getting the direction between the Start and End, then multiplying it by 10.0 [EDIT] then adding it back to the mouse hit location and using it as the new End input.

1 Like