specs-physics icon indicating copy to clipboard operation
specs-physics copied to clipboard

If you use .insert on Write<StorageCollider> you might cause a unwrap() to fail

Open tom-leys opened this issue 5 years ago • 0 comments

  1. Create a collider and do a tick
  2. Replace that with a new collider using Write<StorageCollider>::insert -- Modify event is created by Specs, not Remove and insert --
  3. let collider_handle = physics_collider.handle.unwrap(); - This line in sync_colliders_to_physics (update_collider) will panic

--

Workaround, Use Write<StorageCollider>::remove first.

tom-leys avatar Nov 26 '19 08:11 tom-leys