flyTo After Morphing Scene Mode


I’m trying to start in 2D mode, then fly to a particular location after morphing to 3D (via the scene mode selection button in the standard cesium toolbar).

Using the following code in SandCastle (Win7, Chrome 54.0.2840.87):

  1. The flyTo does not occur
  2. Only ‘morph complete’ is logged
  3. Input is disabled

var viewer = new Cesium.Viewer(‘cesiumContainer’, {
sceneMode: Cesium.SceneMode.SCENE2D

var scene = viewer.scene;
var camera =;

scene.morphComplete.addEventListener(function() {
console.log(‘morph complete’);
destination : Cesium.Cartesian3.fromDegrees(-74.0, 41.0, 15000.0),
complete: function() {
console.log(‘flyto complete’);
cancel: function() {
console.log(‘flyto cancelled’);



This looks like a bug. I’ve submitted an issue here:

Meanwhile, you can fix this by adding a small setTimeout. Here is an example:

scene.morphComplete.addEventListener(function() {
destination : Cesium.Cartesian3.fromDegrees(-74.0, 41.0, 15000.0)
}, 300);




Thanks, I was about to report that it appears to be some sort of race condition and as such also found that using a setTimeout delay was a workaround.

More info:

With the default setting of completeMorphOnUserInput=true, clicking the map during the morph completes it and initiates the flyTo correctly even without the setTimeout.