Update Mesh data

Hello there !
I was trying to scale merged meshes with CSG and now I quite can’t figure how to position it well centered… here is what I’ve made last :
https://www.babylonjs-playground.com/#0XX50N#3
The big figure is centered in 0,0,0 and the shrinked one has a little offcet and is slightly visible and I can’t manage to find a generic solution to center it. I saw that the bounding box datas were stilll the parents one. So do I need to update the mesh matrix ? And how do I do it ?

Ok I found a kind of dirty solution which is to multiply the potision by the ratio applied to the scaling.
Don’t know for now if it will work for future transformations on this shrink or on a shrink on this shrink.

2 Likes