Support Forum

Enemies suddenly turn around and seem to be off their path and try to get back to the path

Hi,

we are using the RecastGraph with local avoidance for our game and we have enemies destroying walls and then, when the wall gets destroyed, enemies start to clump together because they only can get slowly through the wall because the enemies have local avoidance and the enemies in the front suddenly stand still and slowly turn around and then back towards the target. It seems like they don’t know where they have to walk. Is there a common mistake that leads to that?

Is there anything fishy in our configuration? I set the “Slow When not Facing” to false after taking the screenshots and it made it a little better but enemies still sometimes have to turn around because it seems like they want back to their specific path and that looks really odd. I added an example of the wolves not being able to get through the gap between the walls (the walls have a NavmeshCut)

example4 example3

exampleWolf

Hi

Do you think you could share a video of the behavior you are seeing?

In the upper group you see a wolf suddenly turning around. That is the problem I spoke about. It also happens after they killed all the walls. The FPS, while only being around 50 when running, is not as bad as the video looks but if you have some tips for me, I would be glad :slight_smile: