Fix crash when btSoftBody collides with btBvhTriangleMeshShape inside a btCompoundShape

- The triBody->getCollisionShape() returns the btCompoundShape again, which does not implement the btConcaveShape interface required
- The crash happens when processAllTriangles is called below
This commit is contained in:
notrabs 2021-08-08 01:11:04 +02:00
parent 0e124cb2f1
commit b2fd9a492d

View File

@ -195,8 +195,7 @@ void btSoftBodyConcaveCollisionAlgorithm::processCollision(const btCollisionObje
if (triBody->getCollisionShape()->isConcave())
{
const btCollisionObject* triOb = triBody->getCollisionObject();
const btConcaveShape* concaveShape = static_cast<const btConcaveShape*>(triOb->getCollisionShape());
const btConcaveShape* concaveShape = static_cast<const btConcaveShape*>(triBody->getCollisionShape());
// if (convexBody->getCollisionShape()->isConvex())
{