Discover why path is not being found

Hi,

I’m using Get Random Point In Radius to pick a target point. However, the MoveTo call never finds a path between my actor’s location and the destination. I’ve already tested changing various different parameters on my NavMesh and when I draw a line from origin to destination, apparently there’s a direct path between the two points every time (I’m testing on a planar map with no obstacles), nonetheless a path is never found.

Is there a simple way to debug the path finder and discover what’s wrong? What do all the navmesh parameters mean? I couldn’t find any good documentation on this subject anywhere, the reference is not helpful at all.

Thanks in advance!

Does the pawn have an AI controller?

I’m looking at the tooltip for it:

30136-movetosnip.png

It appears that you need an AIController to use it.
Make one or use the default one and assign it to the pawn, perhaps.

Yes, it does. I’m using an AIController and a BTree. Only the path finding doesn’t work, I just need a way to debug and find out why…

I wasn’t able to find anything on true debugging for NavMesh. :C Sorry. You can get the navmesh and bring it to the level blueprint and print overlapping actors to see if it even detects the pawn?

You can also hit the ‘P’ key to toggle navmesh view. Anywhere it is green, it should work assuming your code is fine, meaning the path may be found, but somewhere before that an error is occurring, perhaps with a Blackboard variable not being set or something.

I found this as well, it looks really similar to what you may be doing. : UE4 Pathfinding...basic AI - Cinematics & Media - Epic Developer Community Forums
It’s from March, but still.

These aren’t really true answers to your question of debugging for pathfinder, but hopefully they’ll help lead you to a solution.

(Sometimes when I am making AI, it can be tricky with Z values. Maybe move your actor lower or higher too, if it isn’t flat on the ground? Although, I haven’t run into that issue for a while)

For any AI debugging I strongly recommend using Visual Log. Run vislog console command to summon the UI and take it from there. There should be a lot of information recorded for AI, and we’re adding move every day.

Let me know if you have problems interpreting logged data. Don’t hesitate to share a saved log file.

Cheers,

–mieszko