Author Topic: JBullet Mesh Collision Shapes  (Read 2595 times)

Offline jon81

  • byte
  • *
  • Posts: 1
    • View Profile
JBullet Mesh Collision Shapes
« on: June 14, 2011, 08:02:14 am »
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?


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: JBullet Mesh Collision Shapes
« Reply #1 on: June 14, 2011, 07:42:59 pm »
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.