JBullet Mesh Collision Shapes

Started by jon81, June 14, 2011, 08:02:14 AM

Previous topic - Next topic

jon81

I would like to use a more detailed collision shape for the ground in my jpct app.

Instead of a flat plane I would like to use a mesh to represent the terrain.

From the Bullet documentation:

"For static world environment, a very efficient way to represent static triangle meshes is to use a btBvhTriangleMeshShape. This collision shape builds an internal acceleration structure from a btTriangleMesh or btStridingMeshInterface."

Can some one please post some example code showing how to take an Object3D (the ground mesh) and convert it to either a "btTriangleMesh" or a "btStridingMeshInterface" so that it can be used to create the btBvhTriangleMeshShape?


EgonOlsen

No idea about JBullet, but you can get polygon information from an Object3D by using the PolygonManager. Maybe that helps to recreate the structures needed for JBullet.