[Contribution] Ogre importer: Load physics bodies from blender

Rigidbodies are loaded by the importer, the resulting node of assetManager.loadModel is a node that already contains spatials with rbs on them. This is where the issue comes from.

I added a toggable support to vhacd.
To use it you need to include the jme3-bullet-vhacd library in your project and enable it with

((OgreSceneKey)key).useVHACD(VHACDCollisionShapeFactory)

or

((OgreSceneKey)key).useVHACD(true)

With vhacd enabled, the dynamic rigidbodies with collisions shape setted to Triangle Mesh in blender will be loaded with vhacd instead of GImpact.

This is now disabled by default, and can be enabled with

((OgreSceneKey)key).usePhysics(new OgrePhysicsBullet().useEnhancedRigidbodies(true));

1 Like