Havok box debug drawing is slightly smaller than box

Please see the PG: https://playground.babylonjs.com/#0U7AEA#8

Please note how Havok’s debug drawing of a box is slightly smaller than the box. I found that it’s always smaller by of 0.015 in width, height, and depth.

(Debug drawings look fine for other shapes, e.g. spheres.)

By chance, is there a margin of 0.015 internally in Havok’s debug drawing just for boxes?

(i.e. 0.015 baked into the result returned byHP_Shape_CreateDebugDisplayGeometry() and HP_DebugGeometry_GetInfo()?)

Thank you for your help!

cc @eoin

For performance and behavioral reasons, we shrink convex shapes and re-add that distance in with an additional radius; that value defaults to 1.5cm, but may be less if the object is smaller. When we added CreateDebugDisplayGeometry(), we chose not to add this radius back in, as doing so is a ton more calculation, which we wanted to avoid for a debug tool like that.

So, yes, it is expected to see a small difference like that; you’ll see it for most of our convex shapes - box, cylinder and convex hull.

Thank you so much, all! :grinning_face_with_smiling_eyes: