Adjust point cloud height

I passed the following method to adjust point cloud height not work:
const cartographic = S3DP.Cartographic.fromCartesian(tileset.boundingSphere.center);
const surface = S3DP.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
const offset = S3DP.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, _3dTilesLayer.height);
const translation = S3DP.Cartesian3.subtract(offset, surface, new S3DP.Cartesian3());
tileset.modelMatrix = S3DP.Matrix4.fromTranslation(translation);
other method to adjust point cloud height?

@zyy1987 your code looks correct, and I tested in this Sandcastle. If you change the value of the height in offset the tileset’s height goes up and down as expected.

Could it be something with the _3dTilesLayer.height you’re passing in?

Thank you for your reply。
I find I passing in height error.

1 Like