#detection #collision #generic

collision-detection

A generic collision detection library based on the collide crate

1 unstable release

0.2.0 Jan 9, 2022

#47 in #collision

MIT/Apache

10KB
156 lines

This crate defines an infrastructure to handle collision detection.

It's based on the collide crate, so your colliders need need to implement the Collider trait.

The CollisionManager, which can only contain one type of collider. When you want to use multiple colliders, you currently need to use trait objects or enums.

Then you can add bodies and colliders to the manager. You should store their indices, which will be used when you modify or remove them. When you're done, you can compute the collisions, which you can use to update your objects. Before computing the collisions again, you should update your bodies and colliders. *

Dependencies

~195KB