http://www.babylonjs-playground.com/#1LEGTP#1 Commented code : each rolling ball has a tiny line on its top, normal to terrain.
I just added a new complementary method called : updateCoordinateHeights()
This function can be called at any time, even within the render loop, and recomputes quickly all the heights of your ground if this ground has been updated (morphed, etc).
myMorphFunction(ground);
ground.updateCoordinateHeights();
ground.getHeightAtCoordinates(x, z);
Moreover, all the algo under the hood now never reallocate any new memory, so the GC is happy and you can morph your ground and recompute the hei