Cancel a camera flyTo intentionally?

The documentation for the camera has a “cancel” property for a callback, which suggests that a flyTo could be cancelled. Is it possible to intentionally cancel a flyTo action? I want to stop the movement where it is if the user tries to move the globe. I’ve tried calling camera.move to force a different camera position in hopes that changing it would trigger the cancelled state, but that didn’t stop flyTo from finishing.

If it isn’t possible I could probably write my own flyTo animation, but the existing one is very convenient.

I took a quick look at this because I thought it would be easy; but it appears the camera flyTo functions do not provide an easy and “official” way to cancel a flight (I could be wrong). I wrote up an issue here: https://github.com/AnalyticalGraphicsInc/cesium/issues/2027

Any news about that?

It’s currently not possible to programmatically cancel a camera flight, but it is on the roadmap. I’ll try to remember to update this thread when the feature has been added.

Hello all,
has this been implemented ?
Thanks.

Not that I know of.
We have used the following - outside of the official API - and it works for our use case (= stop flight at user interaction) with no problems so far. You have to check at each update, of course!

Execute a copy of the code of function cancelZoom() (see Widgets/Viewer/Viewer.cs), and then:

var scene = viewer.scene;
if (scene && (scene.tweens.length > 0)) {
scene.tweens.removeAll();
}

``

Willem