I'm pretty sure that the b2PolygonShape::ComputeDistance does not return the actual distance when it comes to corners, only distances along normals.
There is a secondary check after finding the max dot product that checks distance to each point, but I don't think that check will ever do anything. I believe that the greatest dot product can at most be equal to the distance to the nearest point, but never greater than it.
I'm pretty sure that the b2PolygonShape::ComputeDistance does not return the actual distance when it comes to corners, only distances along normals. There is a secondary check after finding the max dot product that checks distance to each point, but I don't think that check will ever do anything. I believe that the greatest dot product can at most be equal to the distance to the nearest point, but never greater than it.
The code in question: