# How to calculate centripetal force and apply it?

**URL:** <https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022>\
**Category:** World Creation\
**Tags:** orbit, unreal-engine, Physics, question\
**Created:** [January 10, 2021, 12:17am UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022 "2021-01-10T00:17:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LukeTLoop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LukeTLoop](https://forums.unrealengine.com/u/LukeTLoop)\
**Post date:** [January 10, 2021, 12:17am UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022/1 "2021-01-10T00:17:18Z")

</div>

I am currently making a script that allows you to be able to rotate around a vector, with gravity and previous velocity taken into account to make it feel as smooth as possible, but I have no clue where to start with calculating/applying centripetal force for the actor. I want to do it in an, “ **Add Force** ” node. Any help is greatly appreciated, thank you.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [January 10, 2021, 3:18pm UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022/2 "2021-01-10T15:18:02Z")

</div>

Hello! You can use analogy. If you rotate point with some mass, with velocity **v** around radius of _R_ and having none radial movement, than _a = v_v / R\* and it’s direction - to the center of rotation. In most cases that force is generated by constraint object (chain, rope, etc). Unreal has several classes to work with some physics constraints, take a look at that [Constraints User Guide | Unreal Engine Documentation](https://docs.unrealengine.com/en-US/InteractiveExperiences/Physics/Constraints/ConstraintsUserGuide/index.html)

---

<div class="post-metadata">

**Author:** ![LukeTLoop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LukeTLoop](https://forums.unrealengine.com/u/LukeTLoop)\
**Post date:** [January 10, 2021, 3:26pm UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022/3 "2021-01-10T15:26:05Z")

</div>

So I actually don’t want to use a constraint object, I want it to kind of like revolve around the point when a key is pressed? If using a constraint object would help with that then I’m open to it.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [January 11, 2021, 3:26pm UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022/4 "2021-01-11T15:26:15Z")

</div>

Ok! So you could just use more common formula

**a** = - **R** ( **V**  **V** ) / ( **R**  **R** ) - **R** ( **V**  **R** ) / ( **R**  **R** )

Here **R** = **ballPointLocation** - **centerPointLocation** and **V** is ball Velocity. The first one is centripetal force while the second - nullify radial movement. Braces is just Dot Product

---

<div class="post-metadata">

**Author:** ![LukeTLoop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LukeTLoop](https://forums.unrealengine.com/u/LukeTLoop)\
**Post date:** [January 20, 2021, 4:46am UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022/5 "2021-01-20T04:46:37Z")

</div>

Sorry I’m so late to reply but could you please give me a blueprint example of this I’ve been trying to understand this and its just not clicking. Thanks.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [January 20, 2021, 3:39pm UTC](https://forums.unrealengine.com/t/how-to-calculate-centripetal-force-and-apply-it/477022/6 "2021-01-20T15:39:41Z")

</div>

Hello! This is very basic method - just to use AddImpulse and change velocity primarily. I prefer C++, so this BP solution is very raw =) But the main idea is working - just change impulse in a way it will be changed by rope (virtual rope constraint). So, perpendicular velocity is saved, but the other is zeroed. To find them just calc vector betwee center of rotation and actor you want to rotate.

 ![327636-accel.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/5/6c5b906c8299a6a7d4c46a6c8671d8b229edd1b0.png)
