I am trying to add a shoot function to my character; when the player clicks, fire where the mouse cursor points. The problem is that occasionally the line trace, from the character to the mouse hit, will sometimes return (0,0,0).
My controller blueprint:
LineTrace function:
Thanks!
Here are ingame screenshots:
Problem:
It seems like the trace was stopping short without returning a hit.
I extended the Line Trace by finding the Direction Vector and adding it to the End point. Now it works fine!
Here is my updated line trace function: