bepu / bepuphysics2

Pure C# 3D real time physics simulation library, now with a higher version number.
Apache License 2.0
2.25k stars 261 forks source link

Fix ConvexHullPairTester get wrong contacts with parallel edges cases #329

Open Pro-Ly opened 1 month ago

Pro-Ly commented 1 month ago

There is a bug in convexhull tester: when one edge from shape B's face perform clipping with shape A'face find two edges parallel, it will override the right result to invalid.

In fact. I believe that there is no need to do anything with parallel edge cases. They will be filtered in the later "if (earliestExit >= latestEntry)" judgements.

RossNordby commented 1 month ago

Thanks; I'm traveling, so it will take a while for me to check this out in depth. This part of the pair tester involves some extremely subtle details if I remember correctly. I'm going to have to stare at it for a while. If you have a reliable reproduction case for the bug (e.g. a convexhull and a set of poses which shows the failure), that'd help me a lot.