解决方法:
- 设置地球透明度
- 设置相机可以进入地下
代码:
OpenUnderGroup() {//设置鼠标进去地下this._viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;//设置地球透明this._viewer.scene.globe.translucency.enabled = true;this._viewer.scene.globe.translucency.frontFaceAlphaByDistance =new Cesium.NearFarScalar(400.0, 0.5, 8000, 0.9);}CloseUnderGroud() {this._viewer.scene.screenSpaceCameraController.enableCollisionDetection = true;this._viewer.scene.globe.translucency.enabled = false;}
QQ群(GIS开发交流、数据共享、软件使用):993836992