This package includes a spaceship script (full source code) for simulating 2D planetary gravity physics and an example scene to show how it works (see the webplayer demo at the bottom).
Touch the screen with your mouse (or your finger on iOS/Android) to navigate the spaceship through the gravity fields of the surrounding planets.
Play the included example scene as Unity webplayer: