-1

For example, I have a planet and a ball. How can I figure out the distance from the planet at which the ball or other objects would start falling into the planet's gravity knowing the mass, size, and density of both objects?

I ask because I am making a physics engine.

Qmechanic
  • 201,751
KKZiomek
  • 157

1 Answers1

1

Theoretically, gravity works at any distance; see this question. However, some game physics engines such as Kerbal Space Program do a cheap approximation by saying that only the gravity of the closest planet (weighted by mass) counts. If you're trying to build a similarly themed game that might be the most practical thing to do.

knzhou
  • 101,976