# How to make objects 'fall' towards each other?

**URL:** <https://forum.defold.com/t/how-to-make-objects-fall-towards-each-other/67877>\
**Category:** Questions\
**Created:** [March 22, 2021, 9:56am UTC](https://forum.defold.com/t/how-to-make-objects-fall-towards-each-other/67877 "2021-03-22T09:56:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [March 22, 2021, 10:44am UTC](https://forum.defold.com/t/how-to-make-objects-fall-towards-each-other/67877/3 "2021-03-22T10:44:36Z")

</div>

@totebo is correct. There is no way to set gravity at runtime (yet). And even if it did, it would be applied to _all_ objects. (Physics engines usually treat the gravity as a global force that is applied each frame)

As suggested, you are better off calculating this yourself.  
Set the gravity to 0, and calculate a force to be applied for each object in the update function.

---

_[View the full topic](https://forum.defold.com/t/how-to-make-objects-fall-towards-each-other/67877)._
