I'm trying to make a simple game where a spaceship is launched and then its path is effected by the gravity of planets.
Similar to this game: http://sciencenetlinks.com/interactives/gravity.html
I wish to know how to replicate the effect the planets have on the spaceship in this game so a spaceship can 'loop' around a planet to change direction.
I have managed to achieve some bogus results where the spaceship loops in a huge ellipse around the planet or is only slightly affected by the gravity of a planet using Vectors.
Thanks in advance.
p.s I have plenty of coding experience just none to do with game dev.