Scaling from pivot or offset not origin?


QUESTION: How to scale up a tree from the roots, not the center origin? :grin:

Here is a PG showing attempts for box to “grow” from sphere

could animate position and scale at the same time, but is there a better way to scale from a pivot?


I usually prefer to use a parent object as a pivot point.


You can set the second argument of setPivotPoint to BABYLON.Space.WORLD:

1 Like

@trevordev and @Gijs - the solution was a mix of BOTH. : )

thank you.

1 Like

Here is an alternative


  • create tree (box);
  • position pivot at root position ( bottom centre of box)
  • position tree so that root is in correct position (move box position.y to 1 so pivot is on ground, plus any x, z)
  • place a marker with it centre at the pivot position (since the box position has been displaced by the positioning of the pivot you need to add(pivotPt) to wherever you position the COMPASS)
  • any transformation of tree now takes place from root (box from bottom).
1 Like

Interesting… like!