首页 / 浏览问题 / 三维GIS / 问题详情
线贴S3M对象的会贴到entity对象上
21EXP 2020年12月28日

线贴S3M对象的时候会贴到entity的model对象上,实际上不想贴在entity的model上

1个回答

您好,感谢您的反馈,我这边先测一下
6,077EXP 2020年12月28日
请问你测试出来了吗?

你好,设置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);

第一:我需要用的是polyline对象不是corridor对象,第二:我这边用你的走廊对象是贴地的,不是贴模型的

我这边添加线和corridor效果都是一样的你那边要还是有问题就留个邮箱,我发个包给你

1466980183@qq.com
已发送。
...