piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.9k stars 236 forks source link

fix: fix testbed findBody function #251

Closed zOadT closed 1 year ago

zOadT commented 1 year ago

The return values for queryAABB were swapped: Returning false stops the query, true continues it.

Previously, if there are two fixtures in an AABB and the first happens to fail the testPoint test, the other one wouldn't even be tested. This lead to bugs in the 8-Ball example.