# Adding force independent of framerate in a loop.

**URL:** <https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676>\
**Category:** Audio\
**Tags:** addforce, unreal-engine, loop, Blueprint, question\
**Created:** [July 11, 2016, 6:21pm UTC](https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676 "2016-07-11T18:21:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomja](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thomja](https://forums.unrealengine.com/u/thomja)\
**Post date:** [July 11, 2016, 6:21pm UTC](https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676/1 "2016-07-11T18:21:33Z")

</div>

Hello

So I’m very new to this whole blueprint system. But I want to add force to a ball.

As you can see in this image here: [http://puu.sh/pY8BT/40fc577446.png](http://puu.sh/pY8BT/40fc577446.png)

Once I enter the trigger box, the ball will have some force added to it. But this, apparently is only added in one frame.

How do I make a loop? Also, how do I make a loop that works independently of the framerate?

Thanks!

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [July 11, 2016, 7:11pm UTC](https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676/2 "2016-07-11T19:11:44Z")

</div>

Can you please clarify when you say, “independently of the framerate”?

Also you are correct that it would only be called in one frame. On enter, leave, overlap, and so on only call once when the event happens, but not persist.

The most common way might be to set a boolean variable when you enter the trigger area, then on Event Tick check if boolean = true, then add force. You’ll probably need to tune the force down a little.

In my example I’ve demonstrated what I described, as well did it a little differently for your reference. I made my sphere a blueprint actor, and put a triggerbox in the level and gave it the tag “ForceTrigger”.

Video: [- YouTube](https://youtu.be/HES1QPovcJ8)  
Image:

 ![98076-forcesample.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/1/b610ed2eec1a679699e4eb0a5c1a551af86d6394.jpeg)

---

<div class="post-metadata">

**Author:** ![thomja](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thomja](https://forums.unrealengine.com/u/thomja)\
**Post date:** [July 11, 2016, 7:54pm UTC](https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676/3 "2016-07-11T19:54:09Z")

</div>

Sweet, using your image I managed to make this for myself which seemed to have given a constant force to the ball as long as I stayed in the box!

[http://puu.sh/pYeve/b807921b39.png](http://puu.sh/pYeve/b807921b39.png)

Question is, will the ball now go faster or slower depending on how high my framerate is?

Thanks!

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [July 11, 2016, 8:14pm UTC](https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676/4 "2016-07-11T20:14:43Z")

</div>

Add Force and Add Force At Location automatically account for Delta Time, so you need not do any extra work.

Also an extra note, you don’t NEED to use Accel Change but you would need more force without it. Also without Accel Change the force you’re applying will have to fight any opposing force or velocity already on the object. You can get the objects velocity though to determine how much additional force to use if you want to go that route.

If you want to manually perform the frame management you would do something like this with Add Impulse…

image:

 ![98077-add+impulse.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/6/dd63f0fecb98fccbbaaf165bf8813a8902743433.png)

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [July 15, 2016, 4:36am UTC](https://forums.unrealengine.com/t/adding-force-independent-of-framerate-in-a-loop/363676/5 "2016-07-15T04:36:57Z")

</div>

If this worked out for you and answered all your questions please mark as solved for others. If you have other questions about this problem feel free to reply.
