Repository navigation
Conversation
The setter only assigned the field, so the broad phase never re-tested the collider: a pair that the collision-types filter rejected at creation time was never found again after the types were widened at runtime (e.g. enabling kinematic-fixed contacts after some steps). Insert ColliderChanges::GROUPS on change, mirroring set_collision_groups and set_solver_groups. Adds a regression test with the reproducer from the issue: it fails before this change and passes after it. Fixes dimforge#1050
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1050.
Collider::set_active_collision_typesonly assigned the field and never set a change flag, so the broad phase never re-tested the collider: a pair that the collision-types filter rejected at creation time (e.g. kinematic-fixed contacts, off by default) was never found again after the types were widened at runtime.The fix inserts
ColliderChanges::GROUPSwhen the value changes, mirroringset_collision_groupsandset_solver_groups, so the broad phase re-tests the collider and the pair is created.The included regression test (
issue_1050_collision_types_change_flag.rs) uses the reproducer from the issue: a kinematic ball resting inside a fixed box, with types widened toActiveCollisionTypes::all()after two steps. Verified locally: