# AI characters push each other and fly around the map. How to fix it?

**URL:** <https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, question\
**Created:** [July 6, 2022, 4:15am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083 "2022-07-06T04:15:16Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![WinnieBoom](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/winnieboom/32/565054_2.png) [@WinnieBoom](https://forums.unrealengine.com/u/WinnieBoom)\
**Post date:** [July 6, 2022, 4:15am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/1 "2022-07-06T04:15:16Z")

</div>

I want them to chase a player and attack when it is possible. It is based on a Character class. AI Controller has UCrowdFollowingComponent.

I want them to behave like Warcraft 3 enemies surrounding a character and attack. But instead, they push each other.

I guess I could disable some physics interactions, but I tried different options and had no luck. Any Advice?

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/b/c6bd2f496a96af9832435b1808b0d7aaedf99cc3.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/b/c6bd2f496a96af9832435b1808b0d7aaedf99cc3.mp4)

---

<div class="post-metadata">

**Author:** ![L.F.A](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l.f.a/32/1194525_2.png) [@L.F.A](https://forums.unrealengine.com/u/L.F.A)\
**Post date:** [July 6, 2022, 4:18am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/2 "2022-07-06T04:18:15Z")

</div>

Hi there,it can be caused by collision settings between melee weapons and character capsules. Are you using hit boxes for dealing damage? I would check that too.

---

<div class="post-metadata">

**Author:** ![WinnieBoom](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/winnieboom/32/565054_2.png) [@WinnieBoom](https://forums.unrealengine.com/u/WinnieBoom)\
**Post date:** [July 6, 2022, 4:25am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/3 "2022-07-06T04:25:36Z")

</div>

The weapon has no collider, and I do not spawn a hitbox to attack, for now, just an animation.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 6, 2022, 9:02am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/4 "2022-07-06T09:02:39Z")

</div>

Seems quite similar to the very recently posted popcorn:

> [@Enemies become popcorn](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/13):
>
> Hi I’m come back [image]

Could this be the movement component mishandling depenetration?

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 7, 2022, 5:03am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/5 "2022-07-07T05:03:27Z")

</div>

Are you talking about collision?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 7, 2022, 6:07am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/6 "2022-07-07T06:07:33Z")

</div>

It’s related - yes, but does not, generally, affect characters since the capsule is not simulating physics. The movement component takes over and uses its own values. The behaviour looks like it but may be irrelevant. Hard to tell without seeing it first hand.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bcfdcaae2f55c35871ecf785578ae5992dd6f17.png)

In case where an overlap happens between Pawns, how quickly do we eject from the intersecting geometry. The direction depends on their centre, afair. If you have a cluster of actors sharing an overlap, and combined with regular collision, this could produce uncanny behaviours.

* * *

You never answered any of my questions from the other thread so not sure how to advice. Seeing a 2nd thread about something quite similar is quite suspicious - maybe this _is_ a bug.

Do the characters perform any actions (apart from moving) that could displace another character? How are their attacks handled (if any)? You posted implementation of launch (was it an enemy actor?) but never commented on it or explained how it was used. Perhaps you ignored it because you know it’s not important here - but it would _nice_ to tell us that. Otherwise we’re stumbling in the dark…

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 7, 2022, 8:45am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/7 "2022-07-07T08:45:49Z")

</div>

The automatic translation on the page was not smooth, so I couldn’t understand the meaning.  
Sorry… ㅜㅜ…

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 7, 2022, 9:02am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/8 "2022-07-07T09:02:26Z")

</div>

(how quickly do we eject from the intersecting geometry.)I don’t understand this.  
I haven’t touched anything Skeletalmesh, collision, nothing else assigned.  
The movement of the character is moved by the behavior tree.  
If you want the geometry value in the picture above, I have the same value.

---

<div class="post-metadata">

**Author:** ![WinnieBoom](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/winnieboom/32/565054_2.png) [@WinnieBoom](https://forums.unrealengine.com/u/WinnieBoom)\
**Post date:** [July 7, 2022, 11:32pm UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/9 "2022-07-07T23:32:03Z")

</div>

I remade the character from scratch, removed any colliders from mesh in Unreal editor, and set NoColision to every mesh I had in the character component. Now it works as expected. Not sure what helped exactly, but thanks everyone for the help!

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 8, 2022, 3:25am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/10 "2022-07-08T03:25:31Z")

</div>

I had the same problem.  
There is a high probability that the Blueprint, C++ code is not the problem, but the actor lying in the field has a collision problem. Did you not copy with alt + w when copying enemies?

---

<div class="post-metadata">

**Author:** ![XxNotAGamerxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxNotAGamerxX](https://forums.unrealengine.com/u/XxNotAGamerxX)\
**Post date:** [August 1, 2022, 12:25am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/11 "2022-08-01T00:25:13Z")

</div>

UE4.27  
This is so annoying. Can someone help? Should I make my own thread???

My character (3D SideScroller) is pushing my AI off ledges, just by me running back and forth past the AI. **The AI flies off like it was hit with a 10000 force, and goes airborn. I do not want this.**

Sometimes when I run/move past my AI (and we are in the same plane), the AI gets NUDGED to the side - which is fine (I want this). But I do not want the 10000 push and the AI gets vertical air.

What is causing this? That is what is annoying me, that Idk.

I tried:

1. 
  - Player BP \> **Character Movement comp \> Mass set to 1** (AI mass set to 10000 - yet still my 1 mass Player pushes the heavy AI into the air???)

2. 
  - Player BP \> **Character Movement comp \> “Depenetration” = tried setting all to 0.** Didnt help.

3. 
  - Player BP \> **Character Movement comp** \> [Character Movement: Physics Interaction] \> **set Enable Physics Interaction = False** (on both Player and AI). But still I push AI into the air by running by him.

4. 
  - Idk if its Touch force or Push Force, etc. But I toggled off Enable Physics Interaction, and the other settings go gray, so they should be off.

5. 
  - Player BP \> **Capsule Comp \> Collision Enabled = Query and Physics** (I need this).

6. 
  - Player BP \> **Capsule Comp \> Collision Presets = Custom** (If I choose no collision, my Player falls thru the world on game start).  
 ![PlayerBP Capsule Comp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/0/550819d40f68b71f4b450a0da39c34b4085b8093.png)

7. 
  - Player BP \> **Mesh (Character) \> Collision Presets = Custom** (I need some block channels to be on. I have some physics bones that I forgot how I setup or which channels need to be on, if any. I just remember if I turned Coll off, I fall thru the ground, or some of my physics bones dont work.)  
 ![PlayerBP Character Mesh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/d/a6d6a9f0be2234263537f007bef993e20a8c0e3a.png)  
Please help, thank you.

---

<div class="post-metadata">

**Author:** ![IamIamIamK1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IamIamIamK1](https://forums.unrealengine.com/u/IamIamIamK1)\
**Post date:** [February 10, 2023, 8:46am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/12 "2023-02-10T08:46:16Z")

</div>

Did you find the solution?

---

<div class="post-metadata">

**Author:** ![XxNotAGamerxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxNotAGamerxX](https://forums.unrealengine.com/u/XxNotAGamerxX)\
**Post date:** [February 10, 2023, 9:17am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/13 "2023-02-10T09:17:28Z")

</div>

@IamIamIamK1 Did you ask me? Partly, but Not really.  
I found that when my player touches AI, it forces them to do the jump anim, or get airborn.  
And I was able to reduce this, so they dont fly off crazy.  
I have 2 setups:

1. I have it where my Player can push AI (nudge to the side), but they cant nudge me (which I do want). If you want this, I will have to get back to you tomorrow and post my Collision channel pics.

2. And I have a different setup where my Player has Modular meshes + Physics set in the Anim BP only. And whatever I did for #1 didnt work for #2 modular meshes. So see my thread for that, I had a bug where collisions were turned off (and got it fixed):  
[How to get Collision channels working on Character BP-SK that has Physics asset set in Anim BP?](https://forums.unrealengine.com/t/how-to-get-collision-channels-working-on-character-bp-sk-that-has-physics-asset-set-in-anim-bp/662508)

3. But if someone has a guide on how to setup normal nudge physics, let us know. (Even physics object that I push (added Physics Component), wiggle and glitch - not natural). Because the default Engine values are insane and idk exactly what to throttle.

4. I also found this paid asset, but not sure if it does what I need. Prefer if someone can teach me. [ActorPush in Code Plugins - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/product/actorpush)

---

<div class="post-metadata">

**Author:** ![Galvanicus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Galvanicus](https://forums.unrealengine.com/u/Galvanicus)\
**Post date:** [May 30, 2024, 5:06am UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/14 "2024-05-30T05:06:18Z")

</div>

I tap a swamp and play raise dead.  
Jokes aside, I encountered the same issue with ironically similar assets.  
Here’s what I tried that was odd:

1. create new character class
2. add mesh to it
3. possess it by an AIC
4. push it, nothing happens, it’s a rock

In a custom character class I have, this behavior is not seen. If I walk into it, it will jump, typically upwards.  
I tried:

- disabling CCD
- removing all collisions in my models
- disabling all collision volumes in both SKs
- disabling all hit events and making anything not capsule collider ignore all collisions
- tinkering with the CMC to disable all semblances of physical interactions
- forced the capsule to be constrained to the X and Y plane and the Z axis locked for location (this somehow failed).  
None of this worked meaning that the capsule colliders are the cause.

In that previous odd example, the second I assign it a movement task in a BT, it starts misbehaving.  
In fact, DURING a move to task, it will popcorn, but when waiting, it will not.  
I tried a suggestion for the deprenetration and to set it lower. It does somewhat avoid it but not entirely and if you make it too low, you just overlap it. So somehow during AI movement, the agent penetrates the character and attempts to get out upwards.

That’s my best guess.  
How to fix this? No idea.

~~Using the simple move to node inside the actor BP seems to avoid this situation entirely. This perplexes me since it uses the same nav agent data to move but it seems that the movement is not misguided by collisions.~~

Edit: as I finished typing this, I managed to get it to bounce even when using the simple move to node and now no movement whatsoever. the CMC is disabled for physics interactions as well. I am at a loss…

It is late, I will do further tests tomorrow but at least we got to this point with as much detail as possible. No idea if this is a bug, an unintended consequence of multiple components or something else.

---

<div class="post-metadata">

**Author:** ![AhmedBero](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ahmedbero/32/1058058_2.png) [@AhmedBero](https://forums.unrealengine.com/u/AhmedBero)\
**Post date:** [October 5, 2024, 7:16pm UTC](https://forums.unrealengine.com/t/ai-characters-push-each-other-and-fly-around-the-map-how-to-fix-it/598083/15 "2024-10-05T19:16:48Z")

</div>

![Screenshot 2024-10-05 184856](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/8/1681c27eba2ba79b22ee4078ca11cc3a461b027c.png)

**This fixed the problem for me. Hopefully, it helps others facing the same issue!**
