I've encountered an issue, when stepping on items, they sometimes fall through the ground.
Screen:

Movie:
Issue at 00:26 seconds - http://www.esenthel.com/download/temp/b ... hrough.mp4
Details:
ground is a static BVH triangle mesh
item is dynamic capsule shape
character is also dynamic capsule shape (my custom implementation of character controller, to which I manually apply velocities)
Any ideas what I could do to make the item not fall through ground?
I've tried adjusting the Item Capsule Body:
getCollisionShape()->setMargin(..) values from 0, 0.00001, 0.001, 0.1, 0.5
setCcdSweptSphereRadius(..); values from 0, 0.00001, 0.001, 0.1, 0.5
setCcdMotionThreshold(0.00001f);
I've also tried commenting out the requirement for CCD that objects aren't in contact
Code: Select all
virtual bool needsCollision(btBroadphaseProxy* proxy0) const
{
//don't collide with itself
if (proxy0->m_clientObject == m_me)
return false;
///don't do CCD when the collision filters are not matching
if (!ClosestConvexResultCallback::needsCollision(proxy0))
return false;
btCollisionObject* otherObj = (btCollisionObject*) proxy0->m_clientObject;
//call needsResponse, see http://code.google.com/p/bullet/issues/detail?id=179
/*if (m_dispatcher->needsResponse(m_me,otherObj))
{
///don't do CCD when there are already contact points (touching contact/penetration)
btAlignedObjectArray<btPersistentManifold*> manifoldArray;
btBroadphasePair* collisionPair = m_pairCache->findPair(m_me->getBroadphaseHandle(),proxy0);
if (collisionPair)
{
if (collisionPair->m_algorithm)
{
manifoldArray.resize(0);
collisionPair->m_algorithm->getAllContactManifolds(manifoldArray);
for (int j=0;j<manifoldArray.size();j++)
{
btPersistentManifold* manifold = manifoldArray[j];
if (manifold->getNumContacts()>0)
return false;
}
}
}
}*/
return true;
}Any advice what can I do?
Thanks