Closed zepumph closed 2 months ago
@samreid and I were able to trace it down to the ability for the boat to detect the block as a contained object incorrectly when you "hit" the top left corner of the block into the curved portion of the bottom right of the boat. This patch is on its way to helping us debug it. It isn't really clear why the logic in oneLiterShapeContainsPoint
is so buggy sometimes. My best guess is that it is about the "stiffness" of objects in the p2 engine, and that for one or two p2 model steps, the objects are wildly overlapping in the physcis. That hasn't been confirmed yet.
Initial report with some more diagnostic info is in #350. Here is an updated patch:
Oddly, in this patch, we often get boatShape.containsPoint evaluating to false, while the boatShape.bounds.containsPoint evaluating to true, even for a point where both should be true.
I thought it would be better to check one test point for the block, but we still have false positives when rapidly colliding the block with the boat:
In other places, we have accepted that the p2 model has slip and uncontrollable error circumstances. Perhaps the solution is to make getEmptyVolume
more tolerant.
@zepumph and I discussed the commit above and decided to go with it, closing.
@samreid and I were both able to reproduce this bug while fuzzing, but CT doesn't show it too much so I don't have a current stack trace.