Navmesh AI not moving

Hello everyone, I am currently trying to create a Pacman project and am in the process of making the ghosts follow the player.

In this case, I have already created a navmesh bounds volume encompassing the walkable paths of the Pacman maze, both the walls and the floor are already set to block all with complex collisions as simple.

After that, I went into the project settings to set up the navmesh agent radius and height. I did this because if not the agents will get stuck around the corners but after I adjusted the radius and height to follow the ghost blueprint radius and height, the ghost AIs would not even move anymore.

I hope anyone who reads this will find the to provide me with a possible fix to the problem.

Currently this is how the navmesh is looking, it is exactly how I want it visually to prevent the red balls (ghosts) from getting stuck around corners.

264113-navmesh0.png

The above image shows to settings I have adjusted to fit the agent radius and height for the navmesh to adjust its spacing accordingly.

This blueprint editor shows the settings and adjustments of the ghost on the right.

264115-navmesh2.png

This detailed view shows the character settings for navmesh, it is set to -1 right now because it relies its values from the project settings.

The image above shows the pawn sensing used to allow the ghosts to follow the player. This one is already working accordingly just in case anyone reading this is wondering.

Hi

Just by looking at it, it appears the red pawns are far to large. Have you changed their scale to something like 0.2 and run it again, just as a test?

Regards

Hi thanks for the reply,

I tried your suggestion by changing the scale of the static mesh and capsule component but none of them seems to change anything.

I thought the AI pawn only uses its relative location to compare for the navigation paths available and would not take account its own size. Which is why I changed the radius in the project settings for a tighter navmesh.

What coding are you using to move them?

I used a simple move to actor which will allow the ghost to always follow the player on begin. This one works fine when I am using the default agent radius of 35 but that would lead to the ghosts getting stuck around corners.

It seems that I need to change the radius of the “RecastNavMesh-Default” inside the project world outlier or in navigation mesh inside the project. Then, add in the supported agents with the corresponding radius as well inside the project settings in navigation system.

One problem I realized is that I actually needed to exit and re-open the project again, then move the navmesh bounds volume back and forth so that it will update the navmesh to update the agent movements properly. I can’t believe I had to spend a few days on-and-off thinking and trying all sorts of combinations just to make this work.

264344-navmesh6.png

  1. Change the radius inside the project settings navigation mesh or inside “RecastNavMesh-Default”.

  1. Add in the supported agent radius inside navigation system.

  2. Save all the project.

  3. Restart project.

  4. Move the “navmeshboundsvolume” back and forth to refresh to new navigation updates.

  5. Try to check the newly updated navmesh.

hello, I’m also making a pacman but it doesn’t look like you. I used the same setting but I didn’t get it. how did you do to achieve it? Thank you


1 Like

I am really grateful to you.
I don’t know how to thank you; you did a great job and solved a very big problem for me.

Man, you are the best, I had this issue and didn’t find anything for 3 weeks, thank you so much for find the solution and share with us!