Download

Line Trace impact point at 0, 0, 0. (My AI can't hit me!)

I’m a college student using unreal and blueprint for the first time ever this term. my team is working on an arena shooter for this class. I was using a tutorial for AI that looked like it worked all the way up to the final steps (specifically this one). For some reason the debug of the line trace it sends out goes right through the player character and by printing strings at various points in the troubled area I’ve come to the conclusion that the line cast itself is going to the right area, but, the impact it’s giving upon breaking the hit is at 0, 0, 0 where there is physically nothing in the level. the AI is nowhere near the origin point when it fires and neither am I, I’m currently under the impression that when the trace doesn’t get a collision it prints as 0’s to prevent an error.

I have an idea that might fix the problem that involves using a copy of the code the player’s shotgun uses (currently the AI is perfectly accurate and more or less unmodified from the video source).

If you have an idea or thought about what might work I’d love a backup plan

First add checks if hit result isValid, and if it hit anything.
Then look into collision of skeletal mesh, your collision is set wrongly there.
One hax (if you are on tight schedule) i can hint is adding capsule static mesh around bots (just like default capsule) and setting its collision to not block but overlap.Then linetrace should detect collision with that mesh. It may save you time looking for right settings for skeletal mesh to collide.

I cannot show you exact collision settings now, have no editor atm.

Could you make a screenshot of your blueprint, so we can see where the error is?