Set mass data consistent velocity (#45)

- Rename b3Body_GetWorldCenterOfMass to b3Body_GetWorldCenter.
- Rename b3Body_GetLocalCenterOfMass to b3Body_GetLocalCenter.
- Fixed b3Body_SetMassData to correct velocity when local center moves.
This commit is contained in:
Erin Catto 2026-07-04 11:22:29 -07:00 • committed by GitHub
commit 0f6fdad541
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 94 additions and 30 deletions

View file

@ -666,7 +666,7 @@ public:
continue;
}
b3Pos massCenter = b3Body_GetWorldCenterOfMass( bodyId );
b3Pos massCenter = b3Body_GetWorldCenter( bodyId );
if ( massCenter.y < -2.0f )
{
IndexPair pair = ConvertToPair( b3Body_GetUserData( bodyId ) );