# Does Crowd avoidance work with Pawn?

**URL:** <https://forums.unrealengine.com/t/does-crowd-avoidance-work-with-pawn/1573191>\
**Category:** C++\
**Tags:** ai-navigation, detour-crowds, detour-crowd-ai-cont, ai-controller, unreal-engine, question, CPP\
**Created:** [December 30, 2023, 9:04am UTC](https://forums.unrealengine.com/t/does-crowd-avoidance-work-with-pawn/1573191 "2023-12-30T09:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cruzjunior](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cruzjunior](https://forums.unrealengine.com/u/cruzjunior)\
**Post date:** [December 30, 2023, 9:04am UTC](https://forums.unrealengine.com/t/does-crowd-avoidance-work-with-pawn/1573191/1 "2023-12-30T09:04:47Z")

</div>

According to the [documentation](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/NavigationSystem/Avoidance/) apparently it should work with any pawn but here is my problem:

I am not using the character movement component, I made my own movement component that derives from pawn movement component. It works fine with the navmesh, so when I use MoveToActor it ends up calling my movement component method **RequestDirectMove(const FVector& MoveVelocity, bool bForceMaxSpeed)** that I overrode and I do the necessary movement from there using the MoveVelocity. But when I turn on Detour Crowd it still calls this method but the MoveVelocity param that it sends is just a vector 0.

So I’m wondering if it does work and I’m doing something wrong or it doesn’t work without a character movement component.

Thanks in advance if anyone can help me with this!

---

<div class="post-metadata">

**Author:** ![PazDim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PazDim](https://forums.unrealengine.com/u/PazDim)\
**Post date:** [July 27, 2024, 11:24am UTC](https://forums.unrealengine.com/t/does-crowd-avoidance-work-with-pawn/1573191/2 "2024-07-27T11:24:58Z")

</div>

For everyone who will face with that problem:  
I was able to add Detour Crowd to AI Controller, my custom movement component is based on UPawnMovementComponent. To achive this I started to use default **Velocity** field in movement component, overridden **GetMaxSpeed** and **GetActorFeetLocation** methods (they are used by UCrowdFollowingComponent).  
Crowd avoidance doesn’t work so good (I think, full avoidance should work with pathfinding), but in some situations my pawn bypasses other pawns.  
…  
Also custom movement component should implement IRVOAvoidanceInterface interface (and configure groups). After that my pawn avoids other pawns good enough :).
