Closed zyxia closed 10 months ago
https://github.com/bepu/bepuphysics2/blob/ca78f54aa06d5352f8fb55db7552b9e7bf0ab075/BepuPhysics/Collidables/ConvexHullHelper.cs#L136 When x is close to 0 and y is greater than 0, the projectedPlaneNormalNarrow variable will become (-1, 0). This will cause the faceNormal calculated by function A in this line to be nearly equal to edgeToTest.FaceNormal. As a result, an edge will continuously be added to and removed from edgesToTest, leading to an infinite loop.
points.zip the test data is in the zip file
Reproduced; thanks for the report! Probably will take a few days for me to get to this.
Alright, 21cc0d2a5f57884ceaaa7e33ca6a3ca9a4cbfe61 should fix it. Probably.
https://github.com/bepu/bepuphysics2/blob/ca78f54aa06d5352f8fb55db7552b9e7bf0ab075/BepuPhysics/Collidables/ConvexHullHelper.cs#L136 When x is close to 0 and y is greater than 0, the projectedPlaneNormalNarrow variable will become (-1, 0). This will cause the faceNormal calculated by function A in this line to be nearly equal to edgeToTest.FaceNormal. As a result, an edge will continuously be added to and removed from edgesToTest, leading to an infinite loop.