I want make path for camera to follow. I was able to do it and now I have this code:
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
infoBox: false, //Disable InfoBox widget
selectionIndicator: false, //Disable selection indicator
shouldAnimate: true, // Enable animations
terrainProvider: Cesium.createWorldTerrain()
});
var startTime = Cesium.JulianDate.fromDate(new Date());
viewer.clock.startTime = startTime.clone();
viewer.clock.currentTime = startTime.clone();
viewer.clock.multiplier = 1;
var positions = [];
Sandcastle.addDefaultToolbarButton(‘Add location’, function() {
var position = viewer.scene.camera.position;
positions.push(position.clone());