Is there no Crowd Avoidance for Pawns? How to setup avoidance for Pawns?

Hello
I can’t bring detour crowd avoidance to work.
I found a lot of Tutorials but most of them are limited to “Simple add the Controller”.
Which I did, I’ve added the DetourCrowdAIController and made a custom CrowdManager, but the System does not work. The Pawns simple move directly into each other, just like with no Avoidance at all.
My guess is, that the DetourCrowds hit test are not blocked at all. What kind of settings could I change here or are required. Or do you have another idea or documentation?

10

//Edit: I’ve deleted my previous wrong assumption.

After checking the DetourCrowdController closer, I’ve seen that the only thing its doing, is adding the CrowdFollowingComponent. This Component uses CharacterMovementComponent heavily. To Character Movement Component requires to have a Character. So this looks like, Detour Crowd can’t be used by Pawns. RVO avoidance neither as this is only implemented in the CharacterMovementComponent. What I don’t understand here is, if you want to have a Crowd, you probably don’t want to depend on the Character as it is more performance heavy than a custom Pawn, but there is no built-in Avoidance?

Is there a built-in lightweight Avoidance that can be used with Pawns?
Is there something else to avoid AI not get stuck with each other I might be missing?

Thanks you.

I ended up making an AI collision channel that only collided with other AI collision. Added that to a collision sphere around my simple zombie AI and I stopped them from stacking on each other. Maybe with cars you could have a diamond shape that pushes each other out of the way so they don’t head on collide. I think there is also a dynamic navmesh solution that changes the navmesh depending on whats on it, you will have to google that I don’t know much about it other then it is used in open world type games that have the navemesh follow you and not extended across the entire land. I think in the AI coding there is a way to set up vision so you can turn away from something. Again I know very little on this and you would have to look into it further yourself.

1 Like

Thank you very much for your answer.
In my mind I expected them to find a way to block each other. But I’ve tried it, and it works really well for units, nice!
The problem I had with it, was that the units sliding along each other takes sometimes a lot of time killing my formation and for the vehicles it looked very clunky.
I therefore decided to try overwrite the Character and the MovementComponent to avoid having to implement detour crowd on a pawn, and that worked surprisingly well.
It still looks a bit clunky though. The performance impact is much(!) smaller than I’ve expected.

Formation

1 Like