Leave other camera flights running when Space Missions stops without a replay

This commit is contained in:
German Khokhlov committed 2026-11-06 14:45:36 +04:00
1 parent 655d93cc92
commit 0de347c328
2 files changed
+20 -4

No files matched your search

+4 -2
View File
@@ -314,9 +314,11 @@ export function createReplay({ state: layerState, services, parts, source }) {
layerState._replayCameraToken++;
if (layerState._replayCameraRemover) layerState._replayCameraRemover();
layerState._replayCameraRemover = null;
layerState._viewer?.camera?.cancelFlight();
if (layerState._viewer?.camera)
// Without a replay the camera is not ours: leave other flights running.
if (stoppedLaunchId && layerState._viewer?.camera) {
layerState._viewer.camera.cancelFlight();
layerState._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
}
layerState._replayCameraLaunchId = null;
layerState._replayPaused = false;
layerState._replayPausedAtMs = null;