Download

Physically Correct (upscaled) planetary gravity.

Hello!

At the moment trying to get an idea of mine to work where i want to reproduce newtons law of gravity F=G((m1 * m2)/r^2). I want to try setting it up with component blueprints so i easily just can add the component to any object in editor (where i can apply physics), add the mass and then it should simulate.

Though i am very new when it comes to blueprints!

Here is what i got so far: 588a1d2d1b1e268ce11e93055ee9ddce1a3a3f7c.jpeg

I do get stuff moving, but it does not seem to be applying the force correctly, because my two object doesn’t close in on eachother, they just travel in the same direction.

What i want it to do, is to get it’s own object. Search in a “infinite” radius around that object. If it finds something it should calculate the force that would be applied between the owner and the object that was found and apply the force to the owner only ( the other object will have it’s own instance of force calculations). It should be working when several objects are interacting since forces are easily added together.

Anyone got input on this?