# How to make my velocities framerate independent?

**URL:** <https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [November 30, 2024, 3:21pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802 "2024-11-30T15:21:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nortksi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nortksi](https://forums.unrealengine.com/u/Nortksi)\
**Post date:** [November 30, 2024, 3:21pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/1 "2024-11-30T15:21:39Z")

</div>

I’m using the get and set physics linear velocity nodes to apply movement to a ball.  
A kick ball event is fired by the player and takes in a value between 0 and 1. This is multiplied by the max speed of the FloatingPawnMovement. I then multiply the player’s forward vector by this amount to set the balls’ velocity in the direction that the player is facing.

A simple drag is applied in the balls’ tick. At the moment this drag value is set at 0.997 as anything below that makes the ball slow too quickly.

After a little bit of testing at 60fps and 120fps there is a noticeable difference in the time it takes for the ball to stop travelling.

How can I make this framerate independent? I understand I should be plugging in the delta time somewhere but I do not know where.

 ![bpball](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/1/6c12d18ea0874da3e6d73c13b36ea7f85012ab55.jpeg)  
 ![bpplayer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/9/b0922465a3cbce5363a0faaf8c23b5b4d42c8ca1.jpeg)

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [November 30, 2024, 3:27pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/2 "2024-11-30T15:27:10Z")

</div>

![Screenshot 2024-11-30 182604](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/b/c3ba9cc0a51f7bc60ae5eca3827215e6d850b64b.png)

Try fixing the framerate from the project settings 😇

---

<div class="post-metadata">

**Author:** ![Nortksi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nortksi](https://forums.unrealengine.com/u/Nortksi)\
**Post date:** [November 30, 2024, 3:28pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/3 "2024-11-30T15:28:36Z")

</div>

I don’t want to lock the frame rate if I can help it.

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [November 30, 2024, 3:36pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/4 "2024-11-30T15:36:36Z")

</div>

I did some research and it seems like you’d either need to use a different node like Add Force or play with the substepping settings under Engine - Physics to your liking. You can easily find those settings I mentioned by searching for “framerate” in the project settings and scrolling down a little bit.

Hope this helps! 😊

---

<div class="post-metadata">

**Author:** ![Nortksi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nortksi](https://forums.unrealengine.com/u/Nortksi)\
**Post date:** [November 30, 2024, 3:43pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/5 "2024-11-30T15:43:46Z")

</div>

Thanks. I will take a look.

---

<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:** [November 30, 2024, 3:47pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/6 "2024-11-30T15:47:45Z")

</div>

There is `Delta Seconds` on the `Tick` node - use it. Or, much better:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/d/66d3d1ec1116045a4b6392a47b90e1ddfdb8f0e9.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/1/de16fecfe87e173ea5898d3121286d137ab1d1ff.png)

---

<div class="post-metadata">

**Author:** ![Nortksi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nortksi](https://forums.unrealengine.com/u/Nortksi)\
**Post date:** [December 4, 2024, 7:45pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/7 "2024-12-04T19:45:17Z")

</div>

Eventually I found two ways to solve this issue.  
First way was to put the drag on a looping timer with a 0.01 tick:

 ![bpball2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/b/b8b80d68a8ae4f2b125585ba5b94f38e037ecdc2.jpeg)

I decided that I wanted drag to be always there, just like linear damping. After a little searching I found this post:

> [@Linear Damping towards one axis?](https://forums.unrealengine.com/t/linear-damping-towards-one-axis/385452/3):
>
> The code that handles LinearDamping is here [DyBodyCoreIntegrator.h | bodyCoreComputeUnconstrainedVelocity](https://github.com/EpicGames/UnrealEngine/blob/70bc980c6361d9a7d23f6d23ffe322a2d6ef16fb/Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/LowLevelDynamics/src/DyBodyCoreIntegrator.h#L72) I’ve re-written it a bit to be easier to read Vector3 linearVelocity float linearDamping float deltaSeconds float linearDampingTimesDeltaSeconds = linearDamping \* deltaSeconds float linearVelocityMultiplier = Max(0.0f, 1.0f - linearDampingTimesDeltaSeconds) linearVelocity \*= linearVelocityMultiplier This uses a single float to reduce velocity in all directions. To solve your problem, th…

This helped me create a linear damping blueprint that only affected the x and y axis which is also being framerate independent.

 ![dragontick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/6/b9651ab8aa6280e2ef0f78a62dc4893eaa072f64.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 3, 2025, 7:45pm UTC](https://forums.unrealengine.com/t/how-to-make-my-velocities-framerate-independent/2159802/8 "2025-01-03T19:45:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
