flyManager.readyPromise.then(() => {
// 批量添加飞行站点
for (let i = 0; i < positions.length; i++) {
const element = positions[i];
const point = new Cesium.Cartesian3(element.x, element.y, element.z)
const flyItem = new Cesium.RouteStop({
waitTime: 0,
heading: 15,
tilt: 10,
stopName: `站点${i}`,
speed: 50,
point: point
})
flyManager.routes.routes[0].addStop(flyItem)
}
// 开始飞行
currentRoute = flyManager.currentRoute
currentRoute.isLineVisible = true
currentRoute.isAltitudeFree = false //取消锁定相机高度
currentRoute.isHeadingFree = false //取消锁定相机方位角
currentRoute.isTiltFree = false //取消锁定相机俯仰角
currentRoute.speed = roamData.speed //设置飞行速度 单位米/秒
let allStops = flyManager.getAllRouteStops();
flyManager.play()
})
创建飞行管理类后我手动添加飞行站点,但是目前只能贴着站点连线飞行,如何调整飞行视角呢,文档中好像没写如何调整到第三人称,自由视角等