rapier
rapier copied to clipboard
Error occurs when changing a body type from dynamic to static if it has attached joints
Version 0.11.1
Steps to reproduce:
- Create two dynamic bodies
- Bind them together with a ball joint
- Simulate a few steps
- Make one of them static
- Simulate more steps (should panic with index out of bounds)
My guess to what's happening here is there is some kind of active / dynamic body list and the joint references the dynamic bodies by its index into that. When a body changes to static it's removed from that list but the joint still references so it tries to get a non existent index and crashes.