Making a hole in Bullet

I have ever made only convex objects in Bullet. For example, I usually make btCollisionShape objects with btConvexHullShape , btBoxShape etc. These objects should be treated convex shape even if the data includes concave vertex (or plane).

I wanted to make a hole and find next page :

btBvhTriangleMeshShape - OOgtech.org

As this page says, I made a btTriangleMesh object to input triangle data, which is passed to a btBvhTriangleMeshShape object. You have to be careful not to mistake the number of vertex, triangle, data etc.
Anyway this way may work correctly.

hole made in Bullet

I also found a page telling the way to make triangle data with btTriangleIndexVertexArray, but this never worked, I don’t know why.
Develop | Comments(0) | Trackback(0)