AI moving in Viewport mode but not in standalone game. I think Navmesh volume isn't loading in standalone - any fix for this ?

In Viewport my ai is moving as it should but aways in packaged game or “standalone” mode or even when loading the level from my main menu all of a sudden nothing moves anymore. It works only if i load the level manualy and press play in viewport. My guess is that NavMeshBoundsVolume doesn’t load correctly or too late. Is there anything i could do to fix this ?

Are you using levels with streaming? You have to have all the maps visible and save the persistent one.

No im not level streaming. Can you tell me how to make the maps visible ? And what do you mean with save them can you tell me how i can do that ? I hope there is some simple solution how to make it or maybe at least some tutorial you can point me to.

I just found this node


Is this what i would need for the map save?

If you don’t use persistent and streaming you shouldn’t worry about what it says, your problem seems even more strange

I do use persistant level just no level streaming
bandicam 2023-11-24 19-27-19-478

So what can i do from here ?
Do i need to save the level and load it in main manu ? I normally just open the level like this (open by name or reference i try both but ai still aint moving)
bandicam 2023-11-24 19-31-21-262

It acctually only works if i go manualy top in the viewport and go to “file/open level” then the level works fine and ai is moving. Everything else aways fails if i load my level from my main menu or switch to standalone game mode…

If all that is fine there, you don’t use the persistent, the save thing means saving the map from the menu.

How do you have this checkbox?

Looks like i have this off

I just activate it like you have but ai still aint moving :frowning:

Sorry, dude i am out of ideas

My recommendation would be to go to basics figure out where the breakdown occurs. To do this start by adding print strings or breakpoints in the AI and try to load the level in stand alone and check things like "does my AI possess it’s pawn? “Is the navmesh valid?” “Is the behavior trees/State tree/function firing as expected?” And so on that would be my first step

Thats acctually a good idea i will try out and see what happens.

Btw i found out that one of my two levels does work now. So the first level the ai is moving now but the second level still isn’t.

Assume that you were clear about what the navmesh is, if you want to debug the AI use this system to see what the AI does, it also has an option that shows the navmesh

1 Like

When the AI Debugging tools are enabled, pressing Numpad 0 will toggle the display of the possible locations the AI can currently navigate to from its current position using the Nav Mesh Bounds Volume (if one is placed in the Level).

So now i activated this debugging tool and I don’t see any nav navmesh in the level. But i have put one there it is just when i load the level from the main menu makes that it now doesn’t exist for some reason. At least i know that is the nav mesh which i supected in the first place. So how to add navmesh which loads correctly ? I tried this nodes but both fail. Only if i manually open this level the navmesh start working just fine…

So here is what i have on the level where the ai is not moving:

And here on the level where the ai moves as it should:

The point is that you don’t have to do anything, it’s automatic.


Another thing you can try is to delete recast navmesh from the scene, sometimes they rot.
image

,then build paths

and sacrifice a chicken


btw, Have you tried an empty map to see if it also happens?

2 Likes

Your idea with “build paths” on the level solved the problem :sunglasses:. Now Ai is finally moving again when loading from main level. Also standalone game is working now as well… Thx man

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.