Navmesh works in editor but moves under map when starting the game

I’am making a game with AI that need the navmesh to move around. The navmesh looks good when the game is not started and you look at it in the editor. See picture:

But when i start the game the navmesh moves from the correct position on the map and instead moves under the map. See picture:

The nav mesh worked perfectly before but after i moved some models to parts of the map this problem occurred.
I have no idea how to fix it so help would be very nice.

Is the navmesh moving, or is it everything else? Have you checked the coordinates of the navmesh before and during the game?

I checked the coordintes of the landscape and they are the same in editor and in game.

I also checked the coordinates of the navmeshbounds volume. They also stay the same.

Ok, but how can that be because you can see the coordinates of one of them is changing… :slight_smile:

I somehow solved it by moving the map in the opposite of the intuitive direction. For exeample if the nav mesh was to high up over the ground i moved the ground even further down to get the navmesh to be placed correctly. I’am still not sure what caused it, maybe i accidentally moved the map before?

Check that the “RecastNavMesh-Default” actor in your level is at the origin.

Try the following steps:

  • Delete “RecastNavMesh-Default”
  • Add a NavMeshBoundsVolume, this will add a new “RecastNavMesh-Default” at the origin
  • Delete the newly added NavMeshBoundsVolume

Edit: If this doesn’t work for you, try checking out this answer Nav Mesh moves when playing - World Creation - Epic Developer Community Forums

7 Likes

This worked for me, thank you!

Thank you so much. The recast navmesh was way over somewhere in the map, and setting it to the level origin fixed it.

That fixed the problem for me too !
Thanks :slight_smile: