Bug with bounding box dimensions

Hello,

I’m having a problem with bounding box updating: when I change the scale of a mesh, the minimum and maximum values of the bounding box don’t update, whereas the minimumWorld and maximumWorld are correct.

Here’s an example playground : Babylon.js Playground

Thanks in advance for your help.

Max

It’s expected, minimum and minimum are in local space, without scale / rotation / translation applied. minimumWorld and maximumWorld are the bounds when the world matrix has been applied, that is when scale / rotation / translation have been taken into account.

3 Likes

OK, thanks for your reply, so how can we find out the dimensions of the mesh (width/height/depth) at any time while we’re modifying the scale with the scalebox of the bounding box gizmo?

You can multiply the local dimensions minimum and maximum with the world matrix yourself to get the dimensions of the mesh.