Prozi / detect-collisions

Detect collisions between different shapes such as Points, Lines, Boxes, Polygons (including concave), Ellipses, and Circles. Features include RayCasting and support for offsets, rotation, scaling, bounding box padding, with options for static and trigger bodies (non-colliding).
https://prozi.github.io/detect-collisions/
MIT License
202 stars 21 forks source link

fix: bbox check uses bodyA twice #79

Closed RedPhoenixQ closed 2 months ago

RedPhoenixQ commented 2 months ago

In checkCollision the bbox of bodyA was used twice. When this is fixed checkCollision returns early and this PR includes a test for this case

Prozi commented 2 months ago

@RedPhoenixQ thanks for contribution! will be part of a new release soon

nice catch!