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.