# Smoothly slow down velocity

**URL:** <https://forums.unrealengine.com/t/smoothly-slow-down-velocity/678480>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, question, Blueprint\
**Created:** [October 27, 2022, 10:10pm UTC](https://forums.unrealengine.com/t/smoothly-slow-down-velocity/678480 "2022-10-27T22:10:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max0906](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Max0906](https://forums.unrealengine.com/u/Max0906)\
**Post date:** [October 27, 2022, 10:10pm UTC](https://forums.unrealengine.com/t/smoothly-slow-down-velocity/678480/1 "2022-10-27T22:10:57Z")

</div>

Hey im working on a mini-golf game and want to fine tune the drag force so that when the ball reaches a certain speed it slows down until it completly stops and goes to sleep.  
but i cant seem to figure out how to do that already tried physics materials both on the ball and the floor, timeline, finterp to. anyone has ideas ?

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [October 27, 2022, 10:21pm UTC](https://forums.unrealengine.com/t/smoothly-slow-down-velocity/678480/2 "2022-10-27T22:21:41Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/4/b249ab4c7a062509c038f199df5c37c3f397354a.png)

this gives you the linear velocity

you multiply by -1 like this

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/d/93d90377dd13944809ecd9dd4912b513f8f3da67.png)

and you have the opposite velocity vector…you can then multiply the result by a factor (like .05) and add to current linear velocity (actually it will subtract because you reversed)

and remember also multiply by delta time and then assign the results again:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/5/d/c5d3514afa1ed9609df6b7ceaeab44899bb99305.png)

---

<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:** [October 27, 2022, 10:25pm UTC](https://forums.unrealengine.com/t/smoothly-slow-down-velocity/678480/3 "2022-10-27T22:25:27Z")

</div>

I would try two ways and see which works better:

1. In Tick(): Get the velocity of the ball. Turn it into a unit direction vector and a magnitude. Subtract a constant times the delta-time from the magnitude. If it’s negative, set magnitude to 0. Set the velocity of the ball to (unit-direction-vector times new-magnitude.)
2. Get velocity of ball. If the velocity is smaller than some epsilon, force the body to sleep. Else apply impulse of strength (constant times delta-time) in the opposite direction of the velocity.

Either one or both of these may work, you’ll want to try them to see. The good news with both of these is that they have a fixed deceleration (tuned by the constant.) Anything that uses the current velocity as a scaling factor, will work more like “air drag” and won’t actually ever get the velocity to zero, because the counter-force scales down as velocity scales down.
