Panda Bullet

I should add one of the thoughts I have for Panda3D 2.0 & physics. It’s about the collision system:

  • Every physics engine uses it’s own collision system. So the collision system is an integral part of physics, and it is not possible to have a “standard” P3D collision system but different physics engines.

  • Panda3D already has a collision system (which is not used by any physics engine except the built-in physics). Lot’s of code is written for this collision system, and replacing it by something completely different will break a lot (too much in my opinion, but this is just my opinion).

  • .egg files can hold information about collision shapes. The .egg importer create CollisionSolids within the scene graph when loading a .egg file.

  • COLLADA importer currently does not create CollisionSolids from COLLADA physics tags, but it COULD be extended to do so.

  • Panda3D support for ODE or PhysX currently requires the user to create “collision objects” (and other, like bodies etc.) through code, and not by importing a model (.egg). ODE or PhysX can not make use of loaded CollisionSolids. They just clutter the scene graph if using ODE or PhysX.

How to improve things:

Way A: .egg loader and all other loaders which are able to load collision geometry create, depending on what physics system (built in, ODE, PhysX, …) is used, collision objects for the physics engine used. Unfortunately ODE and PhysX collision objects are not part of the scene graph…

Way B: .egg loaders and all other loaders which … always create CollisionSolids, and the physics system used should search for CollisionObjects when creating a new body, and use this information.

I’m in favor of way B, and would like to experiment with this way for the next level of Bullet integration. What is your opinion?