Fixes in btContinuousConvexCollision, should fix Issue 347

Continuous sweeps do not detect hits unless body0 and body1 penetrate more than allowedCcdPenetration.
This is to allow sliding objects (characters) where otherwise any contact would result in TOI = 0.
If objects penetrate deeper than allowedCcdPenetration at the start of the sweep, a TOI=0 is reported, unless the motion will separate the objects.

Secondly, a reportFailure method is added to CastResults, to handle failures gracefully (in case max iterations of conservative advancement is reached etc)
This commit is contained in:
erwin.coumans
2011-03-31 21:14:35 +00:00
parent 88b19eb023
commit 0bef2e7363
2 changed files with 14 additions and 46 deletions

View File

@@ -39,7 +39,7 @@ public:
virtual void DebugDraw(btScalar fraction) {(void)fraction;}
virtual void drawCoordSystem(const btTransform& trans) {(void)trans;}
virtual void reportFailure(int errNo, int numIterations) {(void)errNo;(void)numIterations;}
CastResult()
:m_fraction(btScalar(BT_LARGE_FLOAT)),
m_debugDrawer(0),