# Crowd Manager Avoidance Config

**URL:** <https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169>\
**Category:** AI\
**Tags:** detour-crowds, unreal-engine, avoidance, question\
**Created:** [April 15, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169 "2015-04-15T16:53:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [April 15, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/1 "2015-04-15T16:53:05Z")

</div>

I have been working with the detour avoidance system and have been trying to influence how strong the avoidance is so the units will completely veer off if they get really close. That’s when I noticed a section within the Crowd Manager called **Avoidance Config.** By default it has 4 entries. They are all the same struct with the same values. These are show in the image. I tried looking for it but there really aren’t docs regarding it. If anyone can define what each field does I’d really appreciate it.

 ![38883-config.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/6/e26ae88a7fd956d91d96ba3b105e2ca06fff060a.png)

---

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [April 15, 2015, 9:25pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/2 "2015-04-15T21:25:00Z")

</div>

Just as an update I tried experimenting with this. The only noticeable change seemed to be changing Custom Pattern Idx from 255 to 1. That caused a crash (noticeable)

---

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [April 16, 2015, 9:33pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/3 "2015-04-16T21:33:49Z")

</div>

No idea what these are for but I managed to get detour to work better using C++ via the Avoidance Weight parameter.

---

<div class="post-metadata">

**Author:** ![IceWraith](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IceWraith](https://forums.unrealengine.com/u/IceWraith)\
**Post date:** [April 17, 2015, 8:15am UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/4 "2015-04-17T08:15:17Z")

</div>

Those parameters are only for adaptive velocity sampling, defining possible velocity vectors for next step of simulation. Each entry corresponds to avoidance quality enum: low, medium, good, high

It works by creating a rings patterns around center point and can refine results by spawning next, smaller sets of rings recursively, centered on best sample ( **AdaptiveDepth** times). Each velocity sample is weighted using following conditions: does direction match expected direction on path ( **DesiredVelocityWeight** ), does direction match current velocity ( **CurrentVelocityWeight** ), does it go sideways ( **SideBiasWeight** ), does it collide with any known obstacle ( **ImpactTimeWeight** in scan range: **ImpactTimeRange** seconds).

 ![39086-crowdparams.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/2/ab2d484ea2e6e391a6c11781afe815a403dc203b.jpeg)

Sampling preview, using CrowdDebugDrawing::bDebugSelectedActors + CrowdDebugDrawing::bDrawDebugVelocityObstacles flags from CrowdManager.cpp

**CustomPatternIdx** param is for creating your own sampling patterns (SamplingPatterns array), but crashing needs to be fixed 🙂

**Avoidance Weight** is not used by detour’s crowd simulation, but RVO in character movement component. Usually it’s not good to have both system running: they will start colliding with each other.

---

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [April 17, 2015, 1:23pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/5 "2015-04-17T13:23:06Z")

</div>

Hi Lukasz, first off Thanks for the awesome description of this. To Enable the crowd managers debug do I need to be using a pull from GitHub to edit the core library? I tried changing the crowd manager to a custom crowd manager (DebugCrowdManager) in a build on the binary but I don’t have access to the **CrowdDebugDrawing namespace** even though CrowdManager is the parent class.

Just to follow up, I was incorrect I modified **SeperationWeight** in a custom CrowdFollowComponent not **AvoidanceWeight** It looks like a lot of the “controls” for detour are in there. Are their plans to expose them in the future?

---

<div class="post-metadata">

**Author:** ![xlar8or](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xlar8or/32/710746_2.png) [@xlar8or](https://forums.unrealengine.com/u/xlar8or)\
**Post date:** [March 16, 2017, 12:38pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/6 "2017-03-16T12:38:56Z")

</div>

How do i set which quality enum i want to use?

---

<div class="post-metadata">

**Author:** ![IceWraith](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IceWraith](https://forums.unrealengine.com/u/IceWraith)\
**Post date:** [March 16, 2017, 1:22pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/7 "2017-03-16T13:22:07Z")

</div>

That is a property of CrowdFollowingComponent. In native code you can change it inside constructor of your AIController class. In blueprints, check default properties of controller class derived from ADetourCrowdAIController, or any other controller using CrowdFollowingComponent for pathing.

---

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [May 2, 2017, 1:42pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/8 "2017-05-02T13:42:17Z")

</div>

when you say

" In blueprints, check default properties of controller class derived from ADetourCrowdAIController"

what property are you referring to? I use a controller derived from ADetourCrowdAIController, but I’m not sure what property you are talking about?

---

<div class="post-metadata">

**Author:** ![Vaheva](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vaheva/32/963466_2.png) [@Vaheva](https://forums.unrealengine.com/u/Vaheva)\
**Post date:** [November 4, 2017, 12:38am UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/9 "2017-11-04T00:38:59Z")

</div>

Hello @IceWraith!  
I can’t see any default properties in controller from ADetourCrowdAIController and can’t find CrowdFollowingComponent in blueprint version. Crowd is possible with blueprints? How to set up distances between agents etc?  
Thank’s

---

<div class="post-metadata">

**Author:** ![AranEth0n](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AranEth0n](https://forums.unrealengine.com/u/AranEth0n)\
**Post date:** [July 11, 2019, 2:47pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/10 "2019-07-11T14:47:48Z")

</div>

Hello @IceWraith

I have the same issue with the Detour Crowd AI Controller.

I did everything correctly in BP but there are no options for the CrowdFollowingComponent in the Default or any other Section.

May it be possible they aren’t exposed to BPs yet? And if so how I can activate this, since there is really no documentation on how to set up the Detour Ai Controller in C++ either.

Thanks in advance

Cheers

---

<div class="post-metadata">

**Author:** ![ChristianStan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChristianStan](https://forums.unrealengine.com/u/ChristianStan)\
**Post date:** [February 19, 2023, 12:37pm UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/11 "2023-02-19T12:37:10Z")

</div>

It’s been a while, have you managed to solve this issue?

---

<div class="post-metadata">

**Author:** ![RomainFp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/romainfp/32/704894_2.png) [@RomainFp](https://forums.unrealengine.com/u/RomainFp)\
**Post date:** [March 4, 2023, 5:55am UTC](https://forums.unrealengine.com/t/crowd-manager-avoidance-config/315169/12 "2023-03-04T05:55:51Z")

</div>

Hello, I found some documentation about AI Detour Crowd if that can help :  
[https://subscription.packtpub.com/book/game-development/9781788835657/8/ch08lvl1sec51/detour-crowd](https://subscription.packtpub.com/book/game-development/9781788835657/8/ch08lvl1sec51/detour-crowd)
