Fixes (#157)
- Added b3BodyDef::safetyFactor for CCD tuning - #155 - #153 - #148 - #149
This commit is contained in:
parent
47d7f7cc7e
commit
954cf879e7
46 changed files with 1944 additions and 318 deletions
|
|
@ -756,11 +756,11 @@ static void b3FinalizeBodiesTask( int startIndex, int endIndex, int workerIndex,
|
|||
// Body is not sleepy
|
||||
body->sleepTime = 0.0f;
|
||||
|
||||
const float safetyFactor = 0.5f;
|
||||
float safetyFactor = body->safetyFactor;
|
||||
float maxMotion = b3MaxFloat( maxDeltaPosition, maxVelocity * timeStep );
|
||||
if ( body->type == b3_dynamicBody && enableContinuous && maxMotion > safetyFactor * sim->minExtent )
|
||||
{
|
||||
// This flag is only retained for debug draw
|
||||
// This flag is used for debug draw and contact recycling.
|
||||
sim->flags |= b3_isFast;
|
||||
|
||||
// Store in fast array for the continuous collision stage
|
||||
|
|
@ -1444,7 +1444,6 @@ void b3Solve( b3World* world, b3StepContext* stepContext )
|
|||
int awakeBodyCount = awakeSet->bodySims.count;
|
||||
if ( awakeBodyCount == 0 )
|
||||
{
|
||||
b3ValidateNoEnlarged( &world->broadPhase );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue