你好,设置gltf:classificationType: Cesium.ClassificationType.BOTH
设置线:classificationType: Cesium.ClassificationType.S3M_TILE
代码
var gltf = viewer.entities.add({
name: "gltf",
position: new Cesium.Cartesian3.fromDegrees(116.44537480546128,39.905157251908975,5),
model: {
uri: "./SampleData/gltf/man/walk.gltf",
clampToGround: true,
classificationType: Cesium.ClassificationType.BOTH
},
//clampToS3M: true
});
var yellowLine = viewer.entities.add({
name: 'Red line on the surface',
corridor: {
positions: Cesium.Cartesian3.fromDegreesArray([116.44537480546128,39.905157251908975,116.44647962962192,39.90320512482473]),
width: 0.1,
material: Cesium.Color.RED,
//clampToGround: true,
classificationType: Cesium.ClassificationType.S3M_TILE
},
clampToS3M: true
});
viewer.zoomTo(gltf);