Static `btConvexHullShape` Not Participating in Collisions
Posted: Thu Apr 28, 2022 1:35 am
I'm trying to make a simple square static pyramid collision object. It seems I'm supposed to do this with `btConvexHullShape`:I then construct rigid body, etc., the same way I do for every other static object in the scene. In the debug renderer, I can see the pyramid in the correct place (albeit not every edge is present; seems to be a known issue). However, pyramid objects do not seem to detect collisions at all! Other objects seem to be just fine.
Are convex hulls supported for static geometry? If not, why didn't this crash, and what should I use instead for such a simple primitive? If it is supported, why isn't this working and what should I be doing?
Code: Select all
btConvexHullShape* shape = new btConvexHullShape;
shape->addPoint(btVector3(-1,-1,0));
shape->addPoint(btVector3( 1,-1,0));
shape->addPoint(btVector3( 1, 1,0));
shape->addPoint(btVector3(-1, 1,0));
shape->addPoint(btVector3( 0, 0,1));
Are convex hulls supported for static geometry? If not, why didn't this crash, and what should I use instead for such a simple primitive? If it is supported, why isn't this working and what should I be doing?