Adding gravity to an object

I would like to be able to add gravity to an object, so all other objects are pull into this gravity object.

How do I do it ???

Tbh: Thats also for me of interest. Didn’t say the manual something about it? I am not at that part of the manual, but I wonder how they implement it to let you adjust the direction where the gravity is directed to.

A simple example: A ball that is orbiting around a gravity source does the orbit because he is fast enough to overcome/even out the gravity effect. So if the gravity should work as I SUPPOSE it SHOULD work then you would give that ball/sphere a initial speed and then let it circle around either till it collides with the gravity source or it keeps a constant (or expanding) orbit around it.

But thats just my idea of HOW it should work (and how the real world works)…

Regards, Bigfoot29

Use panda’s physics engine. There is a class called LinearSinkForce in pandac http://panda3d.org/manual/epydoc/public/pandac.LinearSinkForce.LinearSinkForce-class.html. Make the LinearSinkForce global by adding it to base.physicsMgr and place the center of it where you want the ActorNodes to be pulled towards.

David shows how to use physics here:
https://discourse.panda3d.org/viewtopic.php?t=330