How to obtain the size of a mesh and transformnode

I want to generate a plane of the same size as the given mesh node. What should I do to know the size of mesh and transformnode.

In this playground, it is evident that the size of the box is different from that of the plane

What I mean by size is that the length and width are the same as mesh or transformnode


I think this might be specific to the type of mesh you are using. In your case, you are using a cube. boundingInfo.diagonalLength returns the largest diagonal from the furthest corners of the cube. Using math, we can extract the side value of the cube from this diagonal by dividing it by the square root of 3.

Check out the playground, where the plane’s height and width is the same as that of the cube. You just need to move the plane to see it. Hope this helps and solves your problem!

1 Like

You should use extendSize instead, here’s an example: Babylon.js Playground (


Thank you for your answers. I fully understand this question :heart: