dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.93k stars 244 forks source link

Setting a new prediction_distance to BroadPhase doesn't create new events #402

Open Mik-pe opened 1 year ago

Mik-pe commented 1 year ago

Found when modifying the prediction_distance using the collision pipeline.

Calling broad_phase.update(...) with two different prediction distances doesn't produce different events using the same scene, as it is only checking the modified colliders.

An ok workaround is to mark the entire collision set as modified.

sebcrozet commented 1 year ago

Modifying the prediction_distance isn’t really expected by the .update function. Modifying .update to mark the whole collision set as modified sounds when the prediction distance is different from the last one sounds like the only way to handle it properly.