SweepMultiByChannel always returns player
Well, I have searched google and it seems that most people have an opposite problem. I am would not normally put this under bug reports, but since I have tried absolutely everything I can think of, I shall do so (of course if there is some coding error, please let me know). I have set up in the custom AI Controller a sphere trace that goes straight out from my enemy pawn (basically a line of sight). I have done this many times before (although one time I did have the same issue, but I cannot remember the solution).
As you can see I have done a debug draw of this and it looks exactly how I expected it too. The issue occurs when I do a simple loop through Hit. I simply check each object hit with and call GetName() and as long as my player has not moved their is no problems, but as soon as their I move at all, the player name starts getting printed.
It appears it was unclear exactly the problem. I need the player to get detected within the trace only, but he is getting detected swept area.
This begins the moment I start moving:
Can you try using the SphereTraceSingle_New() or SphereTraceMulit_New() functions in place of SweepMultiByChannel()? Both of these functions takes an array parameter of actors that will be ignored when the code is ran. If you add your character to that array, it should be omitted from the returned Hit Results.
answered Nov 02 '16 at 05:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here