Physics Engine?

This looks like an excellent software package for my Thesis next semester as I’m developing a simulation program and want it to be open source.

I’m wondering what physics engine Panda 3D uses or if it is setup to integrate with any chosen engine (ex PhysX)?



ODE is quite well integrated into Panda. You can find some examples in the manual and some code snippets on the forums.

There is also a ready to go PhysX wrapper which comes with Panda 1.7.0 (you will need to install PhysX itself separately and of course comply with it’s licence). Here you have the forum thread about PandaPhysX.

Or you can go with Bullet. You can either use it from C++ or try and write a Python wrapper (and perhaps some Panda specific integration). In this thread you can find some basic Bullet wrapper code to look at.

Technically you should be able to use Havok too, if you have such possibilities, but I don’t think anyone tried it.

Thanks, looks like I’ll be using Panda.

Also if your physics is simple you might be able to use panda3d’s native collision stuff.

it pretty much depends on you needs, but i found ODE best. best as in “more intuitive and feature-richer than panda’s one”. all other physics engines available are either WIP, unstable or not so well documented.

I find Bullet superior to ODE in every way. Supposedly ODE physics are better (my usage is very simple so I wouldn’t know), while Bullet has better collision. I would say that for most games reliable collision detection is more important than a realistic simulation. You didn’t say if you are in python or C++ though. If you are in C++ bullet is very easy to use with panda, these are my macros to convert rotations between panda and bullet, the rest is really straightforward.

#define BULLET_QUAT(q) (btQuaternion(q.get_i(), q.get_j(), q.get_k(), q.get_r()))
#define PANDA_QUAT(q) (LQuaternionf(q.getW(), q.getX(), q.getY(), q.getZ()))