integration tests: Simultaneous collisions do not occur in a consistent order #17

Closed
opened 2025-11-18 12:25:18 +00:00 by aidan9382 · 1 comment
Member

Meshes created in the way as seen in fn test_scene() from test_scenes.rs do not collide in a consistent order when hit simultaneously. This is especially noticeable in a 3-way collision where one part is a floor, as this means the test may or may not fail due to a bnum div-by-zero crash related to ground contact

It's hard to know if this is also the case outside of the test_scenes setup, or if it's just the way this specific piece of code does it that leads to the inconsistent behaviour, as I've not yet tried to pin down what exactly is the inconsistent part of this process internally

Repro code can be found in the commit df1b224 at https://git.itzana.me/aidan9382/strafe-project/src/branch/simul-collision-3way

Meshes created in the way as seen in `fn test_scene()` from `test_scenes.rs` do not collide in a consistent order when hit simultaneously. This is especially noticeable in a 3-way collision where one part is a floor, as this means the test may or may not fail due to a bnum div-by-zero crash related to ground contact It's hard to know if this is also the case *outside* of the test_scenes setup, or if it's just the way this specific piece of code does it that leads to the inconsistent behaviour, as I've not yet tried to pin down what exactly is the inconsistent part of this process internally Repro code can be found in the commit df1b224 at https://git.itzana.me/aidan9382/strafe-project/src/branch/simul-collision-3way
Author
Member

There is a proposed fix at https://git.itzana.me/aidan9382/strafe-project/src/branch/consistent-collision-order (I can't PR it due to gitea 500ing on me)

This implementation will prioritise all contacts over intersects, and if they're the same type, collisions are prioritised by model id

There is a proposed fix at https://git.itzana.me/aidan9382/strafe-project/src/branch/consistent-collision-order (I can't PR it due to gitea 500ing on me) This implementation will prioritise all contacts over intersects, and if they're the same type, collisions are prioritised by model id
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: StrafesNET/strafe-project#17