So I made a btGImpactMeshShape for both of them. Each has about 80'000 triangles. This has a very poor performance, but collisions are detected correct.
To speed up the collision detection I thought I can put the world into a btBvhTriangleMeshShape. But as soon as I do that, collisions aren't detected anymore.
Code: Select all
btCollisionObject *collisionObject = new btCollisionObject()
if(strcmp(name,"scene") == 0) {
btBvhTriangleMeshShape *collisionShape = new btBvhTriangleMeshShape(mesh, true);
collisionObject->setCollisionShape(collisionShape);
} else {
btGImpactMeshShape *collisionShape = new btGImpactMeshShape(mesh);
collisionShape->updateBound();
collisionObject->setCollisionShape(collisionShape);
}