You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contact recycling - re-use contact points across time steps when the
relative movement is small. This feature improves stability and
performance. The performance lift is around 25% on benchmarks. I've
tested this a lot and I haven't seen any artifacts. Contact points are
not re-computed until shapes move more than 5cm relative to each other.
This distance can be accessed with these functions:
```c
b2World_GetContactRecycleDistance()
b2World_SetContactRecycleDistance()
```
The default value is `B2_CONTACT_RECYCLE_DISTANCE`. You can set this
distance to zero to disable contact recycling. Contact recycling skips
some updates (i.e. friction, presolve) until the shapes move relative to
each other by ~5cm. I identified some contacts between slow moving
shapes can be delayed. I addressed this by adjusting the recycle
distance for non-touching shapes to use the speculative contact
distance.
Other stuff:
- Build timeouts
- `B2_VALIDATE` that asserts only in debug build
- Update trees task moved earlier in the step
- Moved `constants.h` to the include folder
- Contact solver now uses body indices of 0 to indicate null (static
body)
- AABB margin now considers the shape size to help reduce the number of
pairs
0 commit comments