Hi Adam1, welcome to the forum.
WHAT IF… you DID use scaling… but then you could “reset” the scaling back-to 1,1,1 (default), and the mesh STAYED scaled? Would THAT work for your project?
See the “bake” commands in lines 27, 34, 41. A bakeCurrentTransformIntoVertices() ALSO resets the rotation AND position to 0,0,0. (see console numbers)
It is sort-of like… scale the mesh… but then remove all evidence that you did the scaling. It does the same for mesh rotation and position values… resets them back to construction-defaults.
It is truly moving the vertices of the boxes… while maintaining box origin (pivot point) at worldSpace 0,0,0. Let’s rotate the boxes… see where their origin/pivots are located.
https://www.babylonjs-playground.com/#0QL6BB#7 (I moved center box -y a bit, before bake)
Yep, they are all positioned at world 0,0,0 after the bake, but their vertices positions (sometimes called “positionKind” values) have been “skewed” by our baking.
You CAN move the pivots back to center of mesh, if wanted. (setPivotPoint / setPivotMatrix)
I don’t know if this method of “reset the scaling” would work for your situation, but I thought I should mention it. Party on!