# Push AI (collision with player)

**URL:** <https://forums.unrealengine.com/t/push-ai-collision-with-player/404787>\
**Category:** World Creation\
**Tags:** ai-navigation, self-collision, unreal-engine, Physics, Collision, UE4, question\
**Created:** [September 17, 2017, 9:29am UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787 "2017-09-17T09:29:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fniii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fniii](https://forums.unrealengine.com/u/Fniii)\
**Post date:** [September 17, 2017, 9:29am UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/1 "2017-09-17T09:29:10Z")

</div>

Hello, I would like to be able to push My AIs, they follow me and sometimes block me (i just can’t moove them), I looked in the collision and in the characterMovement Component but I do not find … I just want them to “slide” a little bit when they are against my player in motion

any idea how I could do it? or if I miss something

---

<div class="post-metadata">

**Author:** ![hokage\_naruto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hokage\_naruto](https://forums.unrealengine.com/u/hokage_naruto)\
**Post date:** [September 17, 2017, 2:21pm UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/2 "2017-09-17T14:21:55Z")

</div>

you can use following bp:

 ![213761-screenshot-221.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/1/2f12c7ca558c2f7176ccf45c91fff4fd043918f1.png)

place that code in your ai bp and in place of cast to character use your player character.

---

<div class="post-metadata">

**Author:** ![Fniii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fniii](https://forums.unrealengine.com/u/Fniii)\
**Post date:** [September 17, 2017, 2:46pm UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/3 "2017-09-17T14:46:52Z")

</div>

it does not seem to work… 😕

---

<div class="post-metadata">

**Author:** ![Fniii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fniii](https://forums.unrealengine.com/u/Fniii)\
**Post date:** [September 17, 2017, 7:06pm UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/4 "2017-09-17T19:06:58Z")

</div>

do i need a special collision setup?

---

<div class="post-metadata">

**Author:** ![Fniii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fniii](https://forums.unrealengine.com/u/Fniii)\
**Post date:** [September 19, 2017, 1:57am UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/5 "2017-09-19T01:57:17Z")

</div>

Ok it works, I just had to change my collisions, and put the forward vector of my character in 'delta Location" Thank you 😃

---

<div class="post-metadata">

**Author:** ![HertzRat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HertzRat](https://forums.unrealengine.com/u/HertzRat)\
**Post date:** [December 17, 2020, 12:39am UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/6 "2020-12-17T00:39:16Z")

</div>

I would recommend against this approach. You can easily push a character through a wall using it

---

<div class="post-metadata">

**Author:** ![WolfWorms](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wolfworms/32/734785_2.png) [@WolfWorms](https://forums.unrealengine.com/u/WolfWorms)\
**Post date:** [April 18, 2023, 8:03pm UTC](https://forums.unrealengine.com/t/push-ai-collision-with-player/404787/7 "2023-04-18T20:03:07Z")

</div>

Replying because this comes up on google’s front page with some searches.

The solution I’ve found for this is to use On Component Hit for the player character’s capsule component. On hit, get the impact normal, multiply it by some negative float, and use it to add impulse on the colliding characters’ character movement component.

 ![image_2023-04-18_170304812](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/1/86159a12603b3a1d62d10f672e54c88322185d78.png)
