Skip to main content

b2Body_EnableContactRecycling

Function b2Body_EnableContactRecycling 

Source
pub unsafe extern "C" fn b2Body_EnableContactRecycling(
    bodyId: b2BodyId,
    flag: bool,
)
Expand description

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 b2BodyDef::enableContactRecycling