Welcome to the community!
It looks like your application is based on the Multi-part CZML sandcastle demo. Is that correct? If so, could you please send me a sandcastle demo of what you have so far? Seeing your code would help me understand where you added
viewer.clock.onTick.addEventListener(function(clock) {
let center = entity.position.getValue(clock.currentTime);
let orientation = entity.orientation.getValue(clock.currentTime);
let transform = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromQuaternion(orientation), center);
viewer.camera.lookAtTransform(transform, new Cesium.Cartesian3(-80, 0, 7000))
});
You could update the position and rotation of the Camera
based on the CZML path. You could also get the Cesium Truck’s rotational quaternion and use this to update the Camera
position and rotation. Here is a thread that discusses the second approach
I slightly prefer the second method, however, I would love to hear your thoughts. Regardless, the following sandcastle demo showcases how the Camera
can be updated in the javascript code.
This will clearly be important in any implementation. Let me know if you have any other questions or concerns!
-Sam