Scaling imported mesh by scale factor

Hello! I have an imported mesh (a box) in this playground that I would like to scale according to a scale factor, that is, to scale it while keeping its proportions constant. Since the mesh is made up of 6 faces, I started off by creating a merged mesh but when I try scaling it it doesn’t work. Any help would be appreciated, cheers!

Hello @aklaus,

I’m not sure if this is what you’re looking for, but I use this line to scale meshes:

mesh.scaling = new BABYLON.Vector3(x, y, z);

Replace “mesh” with the name of your mesh, and x, y, and z with numbers :smiley: :+1:

Update:

Sorry, this approach doesn’t seem to work with your mesh for some reason. I’m sure someone else here on the forum will provide the solution soon.

1 Like

Hi @aklaus
Fourth parameter of MergeMeshes is not a boolean :slight_smile:

Error in onSuccess callback:…

Also notised one wall had wrong orientation, flipped it before merge as you can see:

2 Likes