rapier icon indicating copy to clipboard operation
rapier copied to clipboard

Panic when changing rigid body types or when disabling rigid bodies that are colliding with each other in bevy plugin w/ fixed time step.

Open AnthonyTornetta opened this issue 2 years ago • 1 comments

The error message is that an index out of bounds error is happening here in interaction_groups.rs line 440:

let mask1 = if !is_fixed1 { self.body_masks[i1] } else { 0 };
let mask2 = if !is_fixed2 { self.body_masks[i2] } else { 0 };

A simple fix could be verifying i1 and i2 are within self.body_masks.len() - I'll test that to see.

AnthonyTornetta avatar Mar 30 '23 19:03 AnthonyTornetta

Do you have a minimal reproducer for this? This looks like a bug with the enabling/disabling system not assigning a correct active_set_offset to bodies that were modified.

sebcrozet avatar Apr 02 '23 10:04 sebcrozet