[UE5.2]How to make enemy characters go around dynamically created obstacles?

I’m making a tower defense game and I’m using some placeholder enemies. I have a navmesh and the enemies will slide along obstacles that were placed at during the game but won’t actually go around them. Is there a way to make the enemies automatically go around obstacles that are placed during gameplay.

Basically, the user can place turrets (there are invisible blocking volumes placed around the turrets) and the enemies should just go around them. But they don’t.

Here’s an example. I placed turrets in the path of the enemy and he’s now stuck. The cube enemy is trying to get to the exit which is the little platform at the bottom. How do I get the enemy to go around?

edit: Is there a way to view the navmesh during gamplay? P works in the editor, but it goes away once you start playing.

It seems that the blocking volume has to block the Pawn collision type. I wasn’t doing that. Is there a setting to set the collision type?

The enemy now goes around, but it slows right down when going around the corner where I’m guessing it has trouble with narrow paths. Is there a way to keep it going at the same speed? Maybe it’s not navmesh related. Is it a setting in the enemy character itself?

ok. I switched back to the generic AI Controller. I had switched it to the DetourCrowdAIController to see if it worked better. But the generic AI Controller works great now. And I lowered the cell size to have more consistent edges on the nav mesh when adding obstacles.

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