+ provide access to 'root' collision shape, in case the original collision shape is temporarily replaced by a child collision shape.
+ added MultiMaterialDemo showing how to use the new btTriangleIndexVertexMaterialArray. Thanks to Alex Silverman for this contribution!
This commit is contained in:
@@ -34,10 +34,9 @@ m_isSwapped(isSwapped)
|
||||
for (i=0;i<numChildren;i++)
|
||||
{
|
||||
btCollisionShape* childShape = compoundShape->getChildShape(i);
|
||||
btCollisionShape* orgShape = colObj->getCollisionShape();
|
||||
colObj->setCollisionShape( childShape );
|
||||
colObj->internalSetTemporaryCollisionShape( childShape );
|
||||
m_childCollisionAlgorithms[i] = ci.m_dispatcher1->findAlgorithm(colObj,otherObj);
|
||||
colObj->setCollisionShape( orgShape );
|
||||
colObj->setCollisionShape( colObj->getRootCollisionShape());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user