Bulding btBvhTriangleMeshShape out of btBoxShapes

Prelate
Posts: 1
Joined: Mon Feb 06, 2012 10:38 am

Bulding btBvhTriangleMeshShape out of btBoxShapes

Post by Prelate »

I'm trying to use Bullet for collisions checking within my game. Everything is build out of textured cubes, so I think it would be approritate to represent solid ones as boxes and character/enemies as spheres. However, there is a lot of them, and maybe it would be better to unite all static stage geometry into a btBvhTriangleMeshShape.

As I know, cube can be represented via triangles. Is it possible to build btCompoundShape first and then somehow form triangle mesh out of it? Or what other ways to do it are there?