avian2d reports collisions between non-intersecting HalfSpace
and Rectangle
#586
Labels
A-Collision
Relates to the broad phase, narrow phase, colliders, or other collision functionality
C-Bug
Something isn't working
avian2d (including release v0.1.2 and e23d070) reports collisions between non-intersecting (and in fact, far apart) half-space and rectangle (as well as other) colliders.
I believe this is because for most other collider pairs, parry2d reports invalid normals while computing the contact manifolds, and that is what Avian uses to filter out contact manifolds that do not include contacts.
However, even when there are no contacts (i.e.,
manifold.points.is_empty() == true
), parry2d still reports valid normals for collider pairs such as half-space and rectangle. I have also seen this behavior with half-space and segment.The parry2d documentation isn't sufficient for me to easily determine whether additionally (or only) filtering based on reported contact points is the correct way to fix the false collision reports.
The following code demonstrates the bug in Avian. Since the results of
contact_manifolds
are used to populate the list of collisions with no further processing (they go from here to here to here), this results in collisions being reported for the rectangle but not the circle. In this case, neither should have collisions reported.The following code demonstrates the behavior of parry2d.
The text was updated successfully, but these errors were encountered: