Page 1 of 1

How do you determine which direction the gravitational force should pull on an object?

Posted: Wed Feb 08, 2023 11:39 am
by awog
It is possible to use a system of equations with a circle with the length of the force and a line going through it with the slope of the line connecting two points. I just KNOW that there has to be a better, less buggy way.

Re: How do you determine which direction the gravitational force should pull on an object?

Posted: Thu Feb 09, 2023 10:01 am
by testtubegames
If you've just got one object pulling on another - gravity will pull them 'towards' one another. So the direction from one to the other.

If you're working with x-y coordinates, you can find the direction of the vector by using the difference of the objects' x and y coordinates.