- Added b3BodyDef::safetyFactor for CCD tuning
- #155
- #153
- #148 
- #149
This commit is contained in:
Erin Catto 2026-09-16 15:46:31 -07:00 • committed by GitHub
commit 954cf879e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 1944 additions and 318 deletions

View file

@ -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;
}