Fixes 01 (#26)

Fix #25 
Fix replay mover colors
Update README
Added unit test for CCD move events
Avoid Linux crash when OpenGL 4.5 is not present
This commit is contained in:
Erin Catto 2026-07-01 23:19:23 -07:00 • committed by GitHub
commit 1c5ac42c37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 126 additions and 150 deletions

View file

@ -3315,7 +3315,7 @@ void b3RecPlayer_DrawFrameQueries( b3RecPlayer* player, b3DebugDraw* draw, int q
{
b3Pos c1 = b3OffsetPos( q->origin, q->mover.center1 );
b3Pos c2 = b3OffsetPos( q->origin, q->mover.center2 );
b3HexColor c = q->kind == b3_colorLightSkyBlue;
b3HexColor c = b3_colorLightSkyBlue;
if ( draw->DrawCapsuleFcn )
{
draw->DrawCapsuleFcn( c1, c2, q->mover.radius, b3RecQuerySelColor( selected, c ), 0.6f, draw->context );
@ -3335,7 +3335,7 @@ void b3RecPlayer_DrawFrameQueries( b3RecPlayer* player, b3DebugDraw* draw, int q
{
b3Pos c1 = b3OffsetPos( q->origin, q->mover.center1 );
b3Pos c2 = b3OffsetPos( q->origin, q->mover.center2 );
b3HexColor c = q->kind == b3_colorTan;
b3HexColor c = b3_colorTan;
if ( draw->DrawCapsuleFcn )
{
draw->DrawCapsuleFcn( c1, c2, q->mover.radius, b3RecQuerySelColor( selected, c ), 0.6f, draw->context );

View file

@ -563,6 +563,10 @@ static void b3SolveContinuous( b3World* world, int bodySimIndex, b3TaskContext*
fastBodySim->rotation0 = q;
fastBodySim->center0 = center;
// The move event was written before CCD, so correct it with the impact pose
b3BodyMoveEvent* event = b3Array_Get( world->bodyMoveEvents, bodySimIndex );
event->transform = fastBodySim->transform;
// Prepare AABBs for broad-phase.
// Even though a body is fast, it may not move much. So the AABB may not need enlargement.