Sync body flags (#7)

- Fixed mesh point culling for vertically stacked points
- Fixed two point capsule vs capsule normal
- Fixed bug where body flags can go out of sync
- Added tests
- Updated benchmarks
This commit is contained in:
Erin Catto 2026-05-16 23:27:25 -07:00 • committed by GitHub
commit 79cc160275
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 1686 additions and 931 deletions

View file

@ -570,7 +570,7 @@ public:
bodyDef.type = b3_dynamicBody;
b3ShapeDef shapeDef = b3DefaultShapeDef();
shapeDef.baseMaterial.rollingResistance = 0.1f;
shapeDef.baseMaterial.rollingResistance = m_shapeType == e_capsule ? 0.4f : 0.1f;
// Don't allow shapes to collide with each other. This
// makes isolating failures easier.
@ -743,7 +743,8 @@ public:
m_stepCount += n;
}
if ( m_stepCount > 1000 )
int maxSteps = m_shapeType == e_capsule ? 3000 : 1000;
if ( m_stepCount > maxSteps )
{
m_context->pause = true;
m_failure = true;