how to make my "own gravity"

Hi there

Is there a way which I can make my own gravity? That is, create a force that attracts other objects to its center, independently of this objects or the other objects rotation? Kind of like a vortex…

Thanks!

A quick search turned this post up. I think that should answer your question.

thanks!
i just have a problem… i know 0 about python :frowning:
i connected the script to a simple object but it still falls as usual…

You need a motion actuator attatched to the python controller named gvector for the script to work. Make sure you read all the comments in the script to maker sure you learn all you need to about the script. Comments are preceded by the # character

thanks again!
yeah, i missed that connection to the actuator!

i can make it go to the center now… but after that it just continues in the same direction as before.
i noticed that there is a commented line so that the calculations are done on a frame by frame basis… but uncommenting it does not solve the problem… :confused:

Dude do some resurch on the equations for gravitational force and then how to calculate displacement from that.

Its been a while since physics class but to calculate g (gravitational force in neutons) I believe it is g=(m1^2 * m2^2)/(d^2)

I actualy have a feeling that that is way off. but w/e

The correct equation would be f=gm1m2/d^2 where g is the universal gravitational constant (g=6.61*10^-11 in real life)

well in logic block+bullet physics here is a table to follow…

the force is always at 9.8 -Z Globally (unless set otherwise in world settings).

So…

To make something Neutral buoyant, or to suspend something in mid air, give your physics object a 9.8 +Z (Un-click the L you don’t want Local, you want global so your mesh can tumble properly)

a Force 9.8 +Z global, neutralizes the world gravity setting of 9.8-Z, thus your object seems to float… because it is not effected by the constant -z gravity force…

now to simulate something sinking underwater, give the object a lesser value…
9.75 +Z global, should do nicely… now run the game your object will seem like it is underwater or in outer space.

To make a Blimp, or balloon give it a slightly higher +Z force than 9.8…
9.9 is pretty cool…

Well with the right controls, you can make a neat Helicopter , or hovercraft game…

To make the vortex, make your object weightless… do a Always, AND, Edit>Trackto,playerOBnameHERE…Tick the 3D button.
Give the object a +Y foce over 5, and it will constantly move forward…
so with the above it always points at the player, and always moves forward…

Anyways,
I thought I would share a “NON-Programming Guru” solution.

Don’t fear the Logic blocks :stuck_out_tongue:

Ah yes I totaly forgot ‘G’ yea my bad plus being wrong with the two masses