When the event happens, it starts printing "failed". I checked many times if I have a NavMesh on the level or any other problems with it, but I don't think there are any problems with that. Any ideas?
There's a few things that can cause this. Also, yes, it's normal to be frustrated with the AIMoveTo node, as it can be finicky. Your AIMoveTo node does not have a destination. Instead, try to drag off the
As First Person Character and get the actor's world location. You should try inputting that into the
Destination field on the AIMoveTo node.
If this doesn't help, make sure your AI pawn is possessed by AI (you can check this in the class (self) details under a field called
Auto Possess AI.
One more thing, is the
OnSeePawn event firing? It might be having issues seeing you.
I'm assuming the issue is the destination field, though. Keep me updated with this! I want to make sure you get this resolved.
I had the same problem with my project. Suddenly my AI stopped working.
By just selecting the nav mesh volume and changing anything(like a minor adjust in x scale, for example) made it work again.
Maybe Nav Mesh need some kind of refresh after some change in the project.
Assuming that you've set everything up correctly and it's still failing; your Target Actor HAS to be in contact with the navmesh otherwise it will fail regardless of whether the move was successful or not.
I was having the same issue, and actually, what the problem was for me was that I was using a target point actor for the location my AI should move to, and it was in the air (247 units above the ground) and not touching the navmesh. So, it was arriving at the target, then getting confused and then failing after a few seconds, even though it was actually AT the target and the acceptance radius was 300. All I did was move the target point to the ground (pressed END with the target actor selected) and it immediately fixed the issue. So it will register as a fail if the move to target isn't connected to the navmesh even though it did technically walk to the target you specified.
One solution I found actually had to do with the
RunPhysicsWithNoController boolean in the
CharacterMovementComponent. I spawn my AI from the
gamemode to populate servers that are below max player count, and I found that having that boolean as true keeps the character from moving.