Gravitational field

I’ve been trying to discover a solution for this for a while now, so I figured I’d just ask, since I haven’t found anything just right.

I’m attempting to build a solar system simulator, where the player can place planets, and set certain parameters, and see how things turn out. I’m trying to find a way to make the gravity between these planets work in real time, based on a set mass of the type of planet/star.

To try and clarify this, I need to create planets/stars that have a designated mass and gravitational field, and then allow them to be placed anywhere, but have them interact appropriately. So for this, I will need to know how to create the gravity affect for the planets/stars, as well as how to allow them to move in the right direction so they will not simply be pulled into each other.

1 Like