Cesium: View from the front of the tracked entity : <p>I need to achieve a front view for the tracking entity, which will change according to the entities movements.</p>

<p>When I assign a value to <code>viewer.trackedEntity</code> property, the camera assumes a certain position. Is it possible to change this position so that the camera is directly in front of the tracking entity?</p>

<p>How can I do this for this example?</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var viewer = new Cesium.Viewer('cesiumContainer', {
    infoBox: false, 
    selectionIndicator: false,
    shouldAnimate: true, 
    terrainProvider: Cesium.createWorldTerrain()
});

var start = Cesium.JulianDate.fromDate(new Date(2015, 2, 25, 16));
var stop = Cesium.JulianDate.addSeconds(start, 360, new Cesium.JulianDate());

viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();
viewer.clock.currentTime = start.clone();
viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP;
viewer.clock.multiplier = 10;

viewer.timeline.zoomTo(start, stop);

var position = new Cesium.SampledPositionProperty();
position.addSample(start, Cesium.Cartesian3.fromDegrees(-118.243683, 34.052235, 500000));
position.addSample(Cesium.JulianDate.addSeconds(start, 250, new Cesium.JulianDate()), Cesium.Cartesian3.fromDegrees(-110, 35.5, 500000));
position.addSample(Cesium.JulianDate.addSeconds(start, 500, new Cesium.JulianDate()), Cesium.Cartesian3.fromDegrees(-86.134903, 40.267193, 500000));

var entity = viewer.entities.add({
    availability : new Cesium.TimeIntervalCollection([new Cesium.TimeInterval({
        start : start,
        stop : stop
    })]),
    position : position,
    orientation : new Cesium.VelocityOrientationProperty(position),
    model : {
        uri : 'https://cesiumjs.org/Cesium/Apps/SampleData/models/CesiumAir/Cesium_Air.gltf',
        minimumPixelSize : 64
    },
    path : {
        resolution : 1,
        material : new Cesium.PolylineGlowMaterialProperty({
            glowPower : 0.1,
            color : Cesium.Color.YELLOW
        }),
        width : 10
    }
});

viewer.trackedEntity = entity;</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cesiumjs.org/Cesium/Build/Cesium/Widgets/widgets.css" rel="stylesheet"/&gt;
&lt;script src="https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js"&gt;&lt;/script&gt;

&lt;style&gt;
    @import url(../templates/bucket.css);
&lt;/style&gt;
&lt;div id="cesiumContainer" class="fullSize"&gt;&lt;/div&gt;
&lt;div id="loadingOverlay"&gt;&lt;h1&gt;Loading...&lt;/h1&gt;&lt;/div&gt;
&lt;div id="toolbar"&gt;
    &lt;div id="interpolationMenu"&gt;&lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>
