Why is my basic AI not moving?

I feel like an idiot getting this stuck this early in learning basic AI.

I’m following this tutorial on setting up AI navigation:

In the first video, it sets up a bare-bones NPC, nav mesh, blackboard, task and behavior tree. As far as I know, I’m following everything exactly as it’s shown, but the character just stands there.

The best I could narrow it down to is that GetRandomPointInNavigableRadius is returning False and outputs the origin location as the target location. This implies to me that the navmesh isn’t working, but I haven’t modified it. I deleted and reset the nav mesh several times and combed through the project to make sure it’s the same as the tutorial’s example at the end of the video.

I’ve been beating my head against this one problem for hours.

Hi, yeah your GetRandomPointInNavigableRadius fails, so it doesn’t find any point of the navmesh inside that radius around origin.

Did you try to visualize your navmesh (press “P”, so Navmesh Content Examples | Unreal Engine Documentation ) ?

I did. The floor throughout the level shows green.

Ok, did you make sure that the location from GetActorLocation that you use as Origin is where the navmesh is?


Ok, then I don’t see why it should fail. You could try ProjectPointToNavigation with some large Query Extend and see if that finds something.

Otherwise what you could try would be to create a new blank project and try to get a minimalistic example to get to work from there (so to make sure that your current project / current level is not corrupted). So from a new blank project create a new blank level, add a large plane into that, then a navmesh and again try GetNavigablePointInRadius.

Thank you! ProjectPoint worked! I don’t know why it needs to go through that extra step. I’m thinking that the original random point was somehow finding a point above/below the navigable area and ProjectPoint is bringing the Z coord back to the floor.