Can't get AI to move in new Tutorial Your First Game in UE5

In this tutorial we are placing our Charatcer BP in the world and assigning an AI Controller to it. I followed the instuctions to a T. Here is the event graph for the AI Controller


Then I selected the appropriate AI Controller Class in the Details window of the Character BP. Auto Possess is set to default: Placed in World. And, of course, a made a big Nav Mesh Bounds Volume that clearly covers the ground. And yet, the character just stands there in idle mode. Can somebody suggest to me what obvious little detail I am missing? This is a beginner tutorial after all!

3 Likes

Maybe something more systemic there but I don’t know what the tutorial is trying to accomplish. A MoveTo should have a location to MoveTo, so specifying 0,0,0 may be just moving to its spawn point every three seconds, which would be no movement. Trying giving it an actor to move to or a hard coded X and Y destination location (within your NavMesh) just to see what it does.

When Andreas Suika, the instructor, did it, the 0,0,0 coordinates moved the NPC to the world origin. He changes it later, but for demonstration purposes, it was a good first step. But my guy stands there. I even tried moving him around just to make sure I didn’t place him on or near the world origin. Check it out for yourself at 53:00

1 Like

Can you do a Print String on both On Success and On Fail to see what the Movement Result ouputs?

You’re a good man charlie brown. You’re teaching me to debug! I am a very grateful noob. And a frustrated one. I did as you suggested and no string appeared in game.

1 Like

No string is appearing because the Timer is set to 0.0. so Walk is not getting executed. Either change the Time input to something greater than 0 or put AI Move To in Begin Play and test again.

Already tried both of those. In the video he actually sets timer to 3.0. That’s how I had it originally. Did you look at vid, at 53:00?

Yes I watched the whole video already, and also just made the whole setup and it seems to work. Can you share a screenshot of the level?

I’m not sure why that would help, but here you go. The purple bot is the player, the blue is the BP Character with the AI Controller, BUT with the blueprints that tell it to collect the Orbs, which works. The green is another AI made from scratch (new BP-Character, New Ai Controller) with the original setup and it still doesn’t work.

1 Like

Are you getting a print string now? If not, only connect a print to the walk event and see if that fires.

Have you set the AI controller in the pawn? You’ll want to change it to your custom AI Controller, instead of the default.

Pawn settings

You can also put a ‘Possessed’ Event on your pawn, and have it print the controller it’s being controlled by to make sure it’s controlling the pawn.

PossessedCheck

Ok everyone, after a lot tries, I am finally getting something. This Print String


is telling me Aborted when I run the game. So, why is it aborting? Event Begin Play and Move are Printing Strings

Just check that world location x=0 y=0 z=0 is reachable by the AI. If the AI cannot reach the destination + the Acceptance Radius, it will not try to reach it. You can check by putting a sphere (or any actor) in the world and set it’s position to x=0 y=0 z=0, if it does not look reachable, move it to a reachable location and copy the coordinates and paste it into the AIMoveTo node.

You also do not have to have the timer looping, as once the AIMoveTo is started, it continues to execute until it has reached it’s destination.

5 Likes

That was it! And so obvious in retrospect. 0,0,0 was outside the NavMeshBoundsVolume. And to think I spent days trying to figure this out. Thank you EclecticBoogaloo, and to everyone helped. This is a surprisingly helpful community.

I did this 0,0,0 step only to show briefly how the setup works.
When in viewport you can also press “P” to display the nav mesh and check if the point you are giving is valid.
In the tutorial that worked because I knew exactly where my origin is and that there nothing obstructing it. Normally you would try to give coordinates (or like I did later actors) that are reachable.

Happy you folks solved it! Good teamwork!

1 Like

Thank you for replying and for making a really great turotial!

I did all of the above and I checked the area covered with the NavMeshBoundsVolume and still the AI bot won’t move. I have been working on this for 2 hours and no use.
Here is my blueprint and it always hits “Something seems to block me!”

I had the same problem yesterday and I tried solutions in this page and they did not work. However the problem I had was different. My AI bot location was in the negative Z. I raised the landscape to be z>0 and that solved the problem.