Characters randomly stop navigating

I have some characters that like to get stuck. Not on rocks, or anything that I can see. It happens randomly, some play throughs they work just fine, other they go to a random spot and then will not path anywhere.

How can I get some debugging information to try and narrow down the cause of their not pathing anywhere any more?

I am fairly certain it is not due to the map geometry, more often then not they tend to just park themselves in a field and pick daises, glowering at each other.

Is the random location towards world coordinates 0,0,0? Are you using behavior trees with blackboard assets? How do they choose where to go? Attaching some screenshots of your blueprint network will help identify the issue

It is most often a random location within 500 UU of an enemy target. To my knowledge it is never the world origin.
The ai is governed by a behavior tree, however none of the BT movement nodes are used.
The ai is set to (in the controller) to move towards a move token whenever they are more than 100 UU away. The move token is just a dummy actor, that they move toward. The location of the move token is set by blueprint nodes.
The map is a large outdoor arena. A trace downward from 2000 UU above where ever the move token wants to be is done, the move token is then set to wherever the trace ended, +25 uu.
I have not noticed the token being anywhere but approximately 25 uu above the surface of the ground. When the characters stop moving I have not noticed the move token in a place where they could not path to (such as up high on a cliff)

Movement specifically is handled by the MoveToActor blueprint node. When the characters fail to move this node returns failed. The GetMoveStatus node returns idle.

I strongly suspect that the fastest way to solve this problem would be to find more information about why MoveToActor returns failed.
In my searches I have not found any console command or blueprint node that returns more verbose information.

I might have an idea. Can you show me a screenshot of the network where MoveToActor is used?

Prior to executing the code in the screenshot I posted it checks to make sure both the Move token are valid, and greater than 100 uu from our character.

I have not seen the MoveToActor node return anything but either failed, or request successful, so I didn’t see the point in using a switch when there are only two possible results.

Ok. So the problem is specifically at returned failed from MoveToActor. It returns failed at one of either two conditions.

A) Goal is unreachable/out of navmesh (unlikely because of what you stated)

B) The Goal doesn’t exist. Try adding a check such as IsValid on the MoveToken.

You can also use a Switch on Enum instead of a branch on the MoveToActor return value for better organization.

Then add a check using Find Path To Actor, then using IsValid on it to check if a path exists. If that doesn’t work, I’m out of ideas for now.

That unfortunately does not tell me anything new. It can tell me when the path is or is not valid. It is invalid when MoveToActor returns false.

I am back at my initial question, and do not have enough information to find out why they no longer path anywhere.

The project unfortunately is several gigabytes in size. I would prefer not to let that much data get out of my hands.

Thank you for the attempt at helping me.

Well, if you are comfortable sharing the asset I can take a look

Have you tried using Visual Log? It should contain more information, just make sure you have relevant categories
Bring up Visual Log’s UI with console command ‘vislog’, press record and just wait for a guy to block.
Calling AILoggingVerbose console command up front won’t hurt either.

Please let me know if you find anything interesting. Visual Logs are saveable, consider sharing one as well.

–mieszko

I have run the visual log on a match. I’m a little baffled.

Two of the fellows were never able to move from where they spawned.
In the picture attached it is the two bottom characters that could not move.
Unless I am reading it wrong the bottom right character is trying to path to the goal location just a stones toss away. The log says that the goal location is not on the navmesh, or anywhere near.
From what I gather that message is what pops up every time they get stuck.

The VLog is a little big for an attachment. It can be downloaded from my dropbox: Dropbox - Error

This message (“Destination not on navmesh (and nowhere near!)”) means that pathfinding code was not able to find navmesh location corresponding to given goal location. This issue is commonly cause by navigation query extent being too small for given project. I think that’s the case here as well. To change said value go to Project Settings > Navigation System and expand Supported Agent's Default Query Extent, especially in Z axis.

Or you can just put your goals on the ground :smiley:

–mieszko

That might have fixed it. Fingers crossed

For these variables, what are unreasonable values?
Setting it to 400 seems to allow them to move about just fine. (These characters are a shade under 300 units tall)

400uu should be fine. Usually you want DefaultQueryExtent.Z to be a multiplication of agent’s height plus some magic number. In general thing to bear in mind is that navmesh is not always exactly on the ground, it’s just a simplification and at times it can be below or above the ground.

–mieszko