Friction center weighted average (#71)

The central friction anchors now have C0 continuity by using a weighted
average. Reduces jitter while letting the spinning top function
correctly.

Fixes #65
This commit is contained in:
Erin Catto 2026-07-11 23:26:31 -07:00 • committed by GitHub
commit e961bfb7bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 136 additions and 102 deletions

View file

@ -52,8 +52,14 @@ B3_API float b3GetStallThreshold( void );
// @warning modifying this can have a significant impact on stability
#define B3_LINEAR_SLOP ( 0.005f * b3GetLengthUnitsPerMeter() )
/// The minimum length of a capsules. Very short capsules should be created as spheres
/// to avoid numerical problems.
#define B3_MIN_CAPSULE_LENGTH ( B3_LINEAR_SLOP )
/// Minimum contact point friction weight, lower bound for speculative points. Made small
/// enough to be washed away by weights that hit 1.
#define B3_MIN_FRICTION_WEIGHT ( 1e-10f )
/// The distance between shapes where they are considered overlapped. This is needed
/// because GJK may return small positive values for overlapped shapes in degenerate
/// configurations.

View file

@ -3032,9 +3032,6 @@ typedef struct b3DebugDraw
/// Option to draw contact normal forces
bool drawContactForces;
/// Option to draw contact friction forces
bool drawFrictionForces;
/// Option to draw islands as bounding boxes
bool drawIslands;