# How to make a projectile push player?

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813>\
**Category:** World Creation\
**Tags:** unreal-engine, Physics, Collision, projectile, question\
**Created:** [October 10, 2014, 3:59pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813 "2014-10-10T15:59:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iNviSible.yuno](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iNviSible.yuno](https://forums.unrealengine.com/u/iNviSible.yuno)\
**Post date:** [October 10, 2014, 3:59pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813/1 "2014-10-10T15:59:28Z")

</div>

I d like to be able to jump on a projectile and travel on it. This also means that projectile has to push my character away instead of bouncing off of it.

I tried to accomplish this by giving a much bigger mass to collision component of my projectile than to collision component of my character, but apparently its not that easy x)

Any help would be greatly appreciated! =)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_923c79df](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_923c79df](https://forums.unrealengine.com/u/anonymous_user_923c79df)\
**Post date:** [October 10, 2014, 4:10pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813/2 "2014-10-10T16:10:42Z")

</div>

Just disable “bounce” in projectile properties + change collision type from collision sphere to “block all”. Now it will push player + you can also jump onto it 🙂 (everything done in component tab of projectile)

---

<div class="post-metadata">

**Author:** ![iNviSible.yuno](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iNviSible.yuno](https://forums.unrealengine.com/u/iNviSible.yuno)\
**Post date:** [October 10, 2014, 5:40pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813/3 "2014-10-10T17:40:56Z")

</div>

Thanks for quick response!🙂

I set up a new fps bp scene to be sure. If I do what you say, i am able to jump onto projectiles- wich is great. But if I for example fire a projectile, stop time, walk arround it and let it hit me - it just stops instead of pushing me away.

Apart from that, I need projectile to bounce…

Any Ideas?=)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [October 10, 2014, 6:00pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813/4 "2014-10-10T18:00:59Z")

</div>

Hey iNviSible.yuno,

A physics object will not push an actor that does not Simulate Physics. Characters cannot Simulate Physics because it interferes with Character Movement component, which fakes its own physics for movement input. So if you want to push character when a physics object collides with it, you need to fake it by moving character during contact.

You can read about a way to implement that method here:

[https://answers.unrealengine/questions/48892/collision-not-working-when-standing-still.html](https://answers.unrealengine/questions/48892/collision-not-working-when-standing-still.html)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![iNviSible.yuno](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iNviSible.yuno](https://forums.unrealengine.com/u/iNviSible.yuno)\
**Post date:** [October 12, 2014, 9:12pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813/5 "2014-10-12T21:12:39Z")

</div>

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![leo.izq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leo.izq](https://forums.unrealengine.com/u/leo.izq)\
**Post date:** [June 8, 2021, 10:37pm UTC](https://forums.unrealengine.com/t/how-to-make-a-projectile-push-player/295813/6 "2021-06-08T22:37:29Z")

</div>

Hi, i had same problem, i found a solution that i think can be considered accepted given few options:

i created following blueprint structure:

![341025-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/6/1266bef2774d6810d9c8b02e2cb1a16104fc2f0e.png)

c++ code for above is:

```
ADrawer::ADrawer() {
	PrimaryActorTick.bCanEverTick = true;

	rootSceneComponent = CreateDefaultSubobject<USceneComponent>(TEXT("rootSceneComponent"));
	rootSceneComponent->SetupAttachment(RootComponent);

	staticMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("staticMeshComponent"));
	staticMeshComponent->SetupAttachment(rootSceneComponent);

	boxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("boxComponent"));
	boxComponent->SetupAttachment(staticMeshComponent);
}

```

then in BeginPlay function i calculate bounding box volumes ir orden to avoiding doing it manually:

```
FVector min, , center;
staticMeshComponent->GetLocalBounds(min, );
center = - min;
boxComponent->SetRelativeLocation(min + center/2);
boxComponent->SetBoxExtent(center/2);

```

and then finally in Tick function i make following calculation before and after updating object (drawer) location:

```
location = boxComponent->GetComponentLocation();

// put here code that updates you object location

deltaLocation = location - boxComponent->GetComponentLocation();
TSet<AActor*> set;
boxComponent->GetOverlappingActors(set, AMyCharacter::StaticClass());
if (set.Num() > 0) {
	UE_LOG(LogTemp, Warning, TEXT("set = %d"), set.Num());
	AMyCharacter* character = Cast<AMyCharacter>(set[FSetElementId::FromInteger(0)]);
	character->AddActorWorldOffset(-deltaLocation);
}

```

Hope it helps…
