How to make the sphere on the ground during controlling the diameter on this example https://www.babylonjs-playground.com/#GX8A2Y (by each update of values, the sphere has to be on the ground)
The center of the sphere is it’s position, to workaround this you can either update the position of the sphere to of set this or use a parent node for scaling at the bottom of the sphere.
I believe you might be overthinking this a bit, although a transform node will do the trick most of the time. However looking at your other post, I see you want to add physics. Here’s the simplest solution:
The diameter of a box is not the same as a sphere. I would have to make more attempts, but perhaps this PG scene will show you a bit more.
Is this what you’re looking for?
It’s important to understand the transforms of a primitive mesh. It’s all in the math - simple math, that is.
@Galen yup! I see it’s simple math! thank you:)
Is it possible to add a dashed lines to show the diameter of the sphere? https://www.babylonjs-playground.com/#GX8A2Y#9
Something like this? https://www.babylonjs-playground.com/#GX8A2Y#10