Funny moment underground

I just noticed that you’ve placed positions parameter (which is already an array) into an array
await Cesium.sampleTerrainMostDetailed(terrainProvider, [positions]);
does this not work (sans brackets?)
await Cesium.sampleTerrainMostDetailed(terrainProvider, positions);
where you just need to do res[0].height?

//determine camera height 
var cp = viewer.scene.camera.position;
camera_height = viewer.scene.globe.ellipsoid.cartesianToCartographic(cp).height;

//determine terrain_height (already did that)

//determine terrain relative height (edist)
var edist = camera_height-terrain_height;

//my unburrow code (modified to exclude stuff specific to my own program)
if(edist<0) //unbury
{
	var GD_transform = Cesium.Transforms.eastNorthUpToFixedFrame(cp, viewer.scene.globe.ellipsoid, new Cesium.Matrix4());
	var GD_ENU_U = new Cesium.Cartesian3(GD_transform[8],GD_transform[9],GD_transform[10]);
	var temp = new Cesium.Cartesian3();
	Cesium.Cartesian3.multiplyByScalar(GD_ENU_U, (terrain_height - camera_height), temp);
	Cesium.Cartesian3.add (map.scene.camera.position, temp, map.scene.camera.position);
}

Hmm, code block windows in this discord forum are awfully narrow, perhaps for the sake of smarthphone displays. I suppose scrolling is better than word-wrap which can really make the formatting messy.