specs-physics
specs-physics copied to clipboard
If you use .insert on Write<StorageCollider> you might cause a unwrap() to fail
- Create a collider and do a tick
- Replace that with a new collider using Write<StorageCollider>::insert -- Modify event is created by Specs, not Remove and insert --
- let collider_handle = physics_collider.handle.unwrap(); - This line in sync_colliders_to_physics (update_collider) will panic
--
Workaround, Use Write<StorageCollider>::remove first.