convexSweepTest: don't report hits if 'needsContactResponse' reports false.

Should fixes Issue 197
This commit is contained in:
erwin.coumans
2011-03-31 21:20:52 +00:00
parent 0bef2e7363
commit 5cee553a96

View File

@@ -797,6 +797,7 @@ public:
//call needsResponse, see http://code.google.com/p/bullet/issues/detail?id=179
if (m_dispatcher->needsResponse(m_me,otherObj))
{
#if 0
///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);
@@ -814,10 +815,13 @@ public:
}
}
}
}
#endif
return true;
}
return false;
}
};
@@ -859,6 +863,8 @@ void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep)
body->setHitFraction(sweepResults.m_closestHitFraction);
body->predictIntegratedTransform(timeStep*body->getHitFraction(), predictedTrans);
body->setHitFraction(0.f);
body->setLinearVelocity(btVector3(0,0.1,0));
// printf("clamped integration to hit fraction = %f\n",fraction);
}
}