Expand description
Simple collision resolution logic.
Enums§
- Bounce
Direction - The direction in which an object colliding with something should bounce.
Functions§
- collide_
with_ boundary - A function to check collision between some moving object with a bounding box and the edges of some boundary. If the boundary rectangle does not fully contain the bounding box, return the direction the object must bounce to stay within the boundary.
- collide_
with_ rect - A function to check collision between an object moving in
self_direction
with a bounding boxself_bounding_box
, and some other bounding box. If bounding boxes intersect, return the direction the moving object should bounce, otherwise, return None.