When I spawn a bunch AI characters, some of them can move, and others can’t. Randomly. Characters, that can’t move, have an active AI, can sense, shoot, rotate, but not move. Spawning slightly above the floor makes no difference.
In AI debugging mode there is a line “Path following: simulation:NOT ACTIVE” on not movable AI, and there is no “simulation:NOT ACTIVE” line for fully functioning AI.
What does it mean? Does anyone have any idea how to fix it?
Check what is different between the movable and stuck characters.
Take a look at their mobility (static / stationary / movable). The root component (usually a collider of some sort) needs to be set to “Movable” & it’s collision preset should probably be set to “Pawn”.
What is your “Collision Handling Override” setting for spawns? Is it “Try To Adjust Location But Always Spawn”? Perhaps you are spawning them with the default setting that might be colliding with the ground?
Spawn Collision Handling Method set AdjustIfPossibleButDontSpawnIfColliding for character actor. And there are two static mesh spheres components with No collision preset.
Does your navmeshbounds extent to the full area of the tunnel / corridor? It seems the characters near the edges get stuck.
You could try using “GetRandomLocationInNavigatableRadius” to get a fresh position at start and move the newly spawned actor there to be sure it can navigate.
NavMesh extends to the full area and it’s green (accessible) underneath all characters. They are getting stuck in random positions. Sometimes near a wall, sometimes near the center of the corridor.
Try experimenting with Project Settings => Navigation Mesh.
Try reducing your cell size and changing agent height and radius. Increase the agent’s max step height if it’s due to an obstacle.
I think I found the problem. I used DetourCrowdAIController. After I changed it to the regular AIController, the problem was fixed for some reason. Either Detour controller is buggy, or I’m missing something.
It was a problem with “Project Settings” → “Crowd Manager” → “Max Agents” only 50. I had more than 50 active Detour IA characters and some of them were inactive.
You can either increase the number of Max Agents, or reduce the number of active Detour AI characters in the world.