More body flag fixes (#9)

better name handling
This commit is contained in:
Erin Catto 2026-05-29 21:35:38 -07:00 • committed by GitHub
commit 48d9f1dd5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 223 additions and 88 deletions

View file

@ -482,6 +482,16 @@ B3_API void b3Body_SetBullet( b3BodyId bodyId, bool flag );
/// Is this body a bullet?
B3_API bool b3Body_IsBullet( b3BodyId bodyId );
/// Enable or disable contact recycling for this body. Contact recycling is a performance optimization
/// that reuses contact manifolds when bodies move slightly. Disabling it can avoid ghost collisions
/// on characters at the cost of higher per-step work. Existing contacts retain their prior setting;
/// only contacts created after this call see the new value.
/// @see b3BodyDef::enableContactRecycling
B3_API void b3Body_EnableContactRecycling( b3BodyId bodyId, bool flag );
/// Is contact recycling enabled on this body?
B3_API bool b3Body_IsContactRecyclingEnabled( b3BodyId bodyId );
/// Enable/disable hit events on all shapes
/// @see b3ShapeDef::enableHitEvents
B3_API void b3Body_EnableHitEvents( b3BodyId bodyId, bool enableHitEvents );

View file

@ -86,7 +86,7 @@ B3_API float b3GetLengthUnitsPerMeter( void );
/// The time that a body must be still before it will go to sleep. In seconds.
#define B3_TIME_TO_SLEEP 0.5f
/// Maximum length of the body name. Must be at least 1. Includes null termination.
/// Maximum length of the body name. Can be 0 if you don't need names.
#ifndef B3_NAME_LENGTH
#define B3_NAME_LENGTH 18
#endif