Avoid using restitution for ccd motion clamping. Restitution for fast moving objects should be handled by btDiscreteDynamicsWorld::createPredictiveContacts
(make sure to merge islands based on those predictive contacts too, added some check in the solver) This fixes Issue 356. Use same solver settings for AllBulletDemos Make sure to embed the setCcdSweptSphereRadius inside the actual collision shape (for shoot box)
This commit is contained in:
@@ -781,6 +781,39 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
|
||||
|
||||
m_maxOverrideNumSolverIterations = 0;
|
||||
|
||||
#ifdef BT_DEBUG
|
||||
//make sure that dynamic bodies exist for all contact manifolds
|
||||
for (int i=0;i<numManifolds;i++)
|
||||
{
|
||||
if (!manifoldPtr[i]->getBody0()->isStaticOrKinematicObject())
|
||||
{
|
||||
bool found=false;
|
||||
for (int b=0;b<numBodies;b++)
|
||||
{
|
||||
|
||||
if (manifoldPtr[i]->getBody0()==bodies[b])
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
btAssert(found);
|
||||
}
|
||||
if (!manifoldPtr[i]->getBody1()->isStaticOrKinematicObject())
|
||||
{
|
||||
bool found=false;
|
||||
for (int b=0;b<numBodies;b++)
|
||||
{
|
||||
if (manifoldPtr[i]->getBody1()==bodies[b])
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
btAssert(found);
|
||||
}
|
||||
}
|
||||
#endif //BT_DEBUG
|
||||
|
||||
|
||||
for (int i = 0; i < numBodies; i++)
|
||||
|
||||
Reference in New Issue
Block a user