AAIController::MoveToLocation fails in beging the game

Hi!

AAIController::MoveToLocation fails when I recently have started my game. It fails to project the location to the navmesh. I think this is because the navmesh seems to build it self upon the start of the level, however the level is big so this takes some time.

I want my pawns to being able to move directly the game starts but some parts of the level my change later which may affect the navmesh. How can this be solved, is there some event when the navmesh is ready? I though the editor build an initial navmesh to start with.

Also sometimes when the navmesh is ready, the move request randomly fails even though there aren’t any obstacles. I’m using a plain landscape.

Version is 4.5.1

Currently there’s no way to have runtime-modifiable navmesh serialize from saved data. This is a missing feature and we should be taking care of it in not too long from now.

There’s also no event you can register for to get notification regarding navmesh generation finished or being triggered. I’m planning to add this kind of event this weekend. For now can query navigation system about this with UNavigationSystem::IsNavigationBeingBuilt, available also in blueprint.

For debugging movement I’d suggest using LogVisualizer. You summon the UI with vislog console command.

Cheers,

–mieszko

Okay, that sounds good. Thanks!