Gravity from planets and stars

Im very interested in to create a spacesimulator, Freelancer-style, and even possible to land on some planets… The space in the game gonna be totally non gravity, liek in realworld… But I wanna have some gravity on the planets, suns, blackholes… The cool
thing I have in mind was If the spaceship run out of “gas” in a place with lots of black holes or planets and other massive things, it will pull the spaceship to it, and how closer the spaceshit is, how stronger is the gravity, and faster the spaceship goes… Some thing, like blackholes will take the spaceship even if the spaceship have full power from it, if it come to close…

The question is, how can I create gravity to these massive stuff…

Thx.

Working on a test for ya

grrrrreat…I´ll check out later

Spaceshit… hah! good one!

and sorry for the off topic…

You could try something like, putting some motion actuoator to your ship(s), and it will always move the spaceship towards the planet(s).

Or create a plane or a cube or something and make it to track to the planet. Add an motion actuator which slowly moves toward the planet. Veery sloowly.

NOTE: Untested theories. I don’t know will they work, but just got the idea when testing the TrackTo actuator.

Spaceshit, ha ha. I didnt even catch that one! LOL

Well, the thing is, IT Shall not moving to a planet who are to long away from da spaceship, It will only move toward a planet if the spaceship is close to it. understand?..
With your teori, it will always moving to planets which is very far away, and I don´t want that…

Maybe this is an idea, but you need python:
Add a force to the spaceship.
-Calculate the stength of the force out of the distance to the planet.

• The direction of the force should be from spaceship to the planet.
If you have multiple planets you can add more than one forces.

But I think this requires some mathematics :evilgrin: .

Spaceshit is cool ! Very cool.
I think simple script of gravity to point (nice work on ver 2.34): http://www.box.net/public/fqb958k2hy

I think you can use the script I put on this thread, with some tweaking to do this grav effect : http://blenderartists.org/forum/showthread.php?t=87058

Well what about near sensors or something? When it is near enough it will pull more… but this will make somewhat oddworld gravity… and stuff. /ih shit i said it again!)