I ran into a crash calling narrowphase.bodiesOverlap() this morning that was due to Narrowphase.prototype.circleConvex being called with the convex being passed in as the circle shape, and the circle shape being passed in as the convex parameters. After looking around in the code, I couldn't figure out what should be preventing this from happening but couldn't find anything. Maybe I'm missing something, but this seems like this bug should happen pretty much half the time mixed collider shapes are tested for overlap. I forked and fixed the issue by checking which order the shapes are expected to be passed into the narrowphase collider function. I'm making a pull request for this in case it's useful to anyone else someday.
I ran into a crash calling narrowphase.bodiesOverlap() this morning that was due to Narrowphase.prototype.circleConvex being called with the convex being passed in as the circle shape, and the circle shape being passed in as the convex parameters. After looking around in the code, I couldn't figure out what should be preventing this from happening but couldn't find anything. Maybe I'm missing something, but this seems like this bug should happen pretty much half the time mixed collider shapes are tested for overlap. I forked and fixed the issue by checking which order the shapes are expected to be passed into the narrowphase collider function. I'm making a pull request for this in case it's useful to anyone else someday.