From a185bd5a6ef790c449580819bb585907bda8f2d1 Mon Sep 17 00:00:00 2001 From: Ashley Rogers Date: Mon, 4 Mar 2024 19:06:30 -0500 Subject: [PATCH] Use rotation from globe anchor --- Runtime/CesiumFlyToController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/CesiumFlyToController.cs b/Runtime/CesiumFlyToController.cs index b5c53656..399842f8 100644 --- a/Runtime/CesiumFlyToController.cs +++ b/Runtime/CesiumFlyToController.cs @@ -357,7 +357,7 @@ private void ComputeFlightPath( { // The source and destination rotations are expressed in East-Up-North coordinates. pitchAtDestination = Mathf.Clamp(pitchAtDestination, -89.99f, 89.99f); - this._sourceRotation = this.transform.rotation; + this._sourceRotation = this._globeAnchor.transform.rotation; this._destinationRotation = Quaternion.Euler(pitchAtDestination, yawAtDestination, 0.0f); this._destinationECEF = destinationECEF;