Spawned AI works, but can't move. Path following: simulation:NOT ACTIVE

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?

1 Like

In your AI controlled character have you set Detail => Pawn => Auto Possess AI to “Placed in World or Spawned”?

Yes. “Placed in World or Spawned” is set. I spawned 10 same characters. Some of them can move, others can’t.

Behavoiur tree nodes are lighting up, but MoveTo node always fail in those not movable characters.

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”.

They are the same.

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.

Here is a small demo.
Spawned AI works, but can’t move. Path following: simulation:NOT ACTIVE - Bug demo Unreal Engine 5 - YouTube

AdjustIfPossibleButAlwaysSpawn made no difference.

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.

Here is one not movable in the center.

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.

See if runtime generation => dynamic fixes this

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.

Anyway, this problem is solved for now.

Thank you for your help.

1 Like

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.

2 Likes

Yep, that was the reason my spawned agents wasn’t moving and any Debug Drawing wasn’t showing any info.

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