Box-2 position 1 heigth

I would like to consult you about a problem that I cannot solve.

width and depth will be fixed but height will be dynamic.
Height will come from two different positions.
I couldn’t make the logic, can you help me?

 var sizeHeight = oneColumn.position.x + twoColumn.position.x

                const box = BABYLON.MeshBuilder.CreateBox("", { height: sizeHeight , width: 3, depth: 0.25 });
                box.position.x = oneColumn.position.x;
                box.position.y = 1;
                box.position.z = twoColumn.position.x;


Can you share a repro in the PG AND (more importantly) explain based on what context or data ‘the height will be dynamic’.
To be honest (I hate to state this and don’t get me wrong, but…) the code you are showing here simply doesn’t make any sense to me.


Could you provide a PG to help with answer?

1 Like

you could set a size of 1 for height and dynamically change the scaling.y ?

1 Like