How to scale mesh to a fixed size according to mesh size

Hi all:
I have met a problem. I have some models, these models have different size, some are too big, some are too small. Could you have some ideas to make all these models scaling to a normalization coordinates.

Hi, how about

mesh.scaling.scaleInPlace(1 / mesh.getBoundingInfo().boundingSphere.radius);

?

1 Like

Yes, It is a good idea. I will try it later.

You can also use this function: https://doc.babylonjs.com/api/classes/babylon.abstractmesh#normalizetounitcube

1 Like