PhysicsShape.getBoundingBox() returns empty object

Hi everyone,

Here is a playgroudn:

The bounding box is an empty object. Tracing this from here to here there is just a type cast from “{}” to “BoundingBox”.

Couldnt find anything bounding boxy here: havok/packages/havok/HavokPhysics.d.ts at main · BabylonJS/havok · GitHub

Dirty quick fix:

FYI, use case is to dispose/merge the mesh after creating PhysicsShape from it. The PhysicsBody just gets a TransformNode. Since the mesh is disposed, it would be useful to query the bounding box from the shape.

Best wishes

adding @Cedric

1 Like

Indeed! Implementation is empty for shape bounding box. Is there some methods available with Havok we can expose? I didn’t find anything in the d.ts interface @eoin

Otherwise, it’s possible to do more or less like you did @Joe_Kerr and store the bbox in the physicsShape.

1 Like

We do have functionality inside the WASM. We can certainly expose it; will get it into the next update.