# AddForce is preserved even after I stop applying it

**URL:** <https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779>\
**Category:** C++\
**Tags:** force, unreal-engine, UE4-27, question\
**Created:** [February 19, 2022, 1:25am UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779 "2022-02-19T01:25:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kallari\_JG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kallari\_JG](https://forums.unrealengine.com/u/Kallari_JG)\
**Post date:** [February 19, 2022, 1:25am UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779/1 "2022-02-19T01:25:59Z")

</div>

Hi, I have this code:

```auto
if(MainComponent && FVector::Dist(GroundTraceHitResult.Location, MainComponent->GetComponentLocation()) > 200.0f)
{
	MainComponent->AddForce(MainComponent->GetUpVector() * -1000.0f);
}

```

I read that AddForce “Should be called every frame for the duration of the force.”, but even when I stop applying it, the force is still preserved, and pawn is still going down

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [February 19, 2022, 9:12am UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779/2 "2022-02-19T09:12:08Z")

</div>

It simulates physics, so it keeps its momentum. If you want it to stop, you have to explicitly tell it to stop.

---

<div class="post-metadata">

**Author:** ![Kallari\_JG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kallari\_JG](https://forums.unrealengine.com/u/Kallari_JG)\
**Post date:** [February 19, 2022, 9:18am UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779/3 "2022-02-19T09:18:15Z")

</div>

Ok, how can I do it? I don’t want to stop all the movement, just this force

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [February 19, 2022, 9:32am UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779/4 "2022-02-19T09:32:17Z")

</div>

You can call `StopMovementImmediately()` on the pawn movement component if you want to stop movement altogether, or if you’d like to maintain horizontal movement but stop vertical movement, you can do something like `GetCharacterMovement()->Velocity *= FVector(1,1,0);`

---

<div class="post-metadata">

**Author:** ![Raja.Haris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/raja.haris/32/1191940_2.png) [@Raja.Haris](https://forums.unrealengine.com/u/Raja.Haris)\
**Post date:** [February 19, 2022, 7:28pm UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779/5 "2022-02-19T19:28:02Z")

</div>

Momentum is what keeps it moving as Tuerer mentioned. it will stop eventually.

If its the character you want to move I suggest you use.

 ![dd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/9/9096442e893b8257ce4bc6aec9ee43af10c43816.jpeg)

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [February 19, 2022, 8:13pm UTC](https://forums.unrealengine.com/t/addforce-is-preserved-even-after-i-stop-applying-it/499779/6 "2022-02-19T20:13:31Z")

</div>

> [@Kallari\_JG](#):
>
> I don’t want to stop all the movement, just this force

Force does not impart movement, force imparts acceleration.  
Position is the integral of velocity.  
Velocity is the integral of acceleration.  
Acceleration is the integral of force (divided by mass.)

Also, if you have an `ACharacterMovementComponent` involved, know that the Unreal character is not particularly physical; it does a bunch of hacks to make a typical “action game character” move in a satisfying manner, but it doesn’t behave as per the rules of a rigid body simulation.
