CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
347 stars 83 forks source link

Change `CesiumCameraController` and `CesiumFlyToController` to use `CesiumGlobeAnchor` on parent GameObjects #422

Closed azrogers closed 7 months ago

azrogers commented 7 months ago

Closes #415.

Currently, the CesiumCameraController and CesiumFlyToController expect to be on an object with a CesiumOriginShift and CesiumGlobeAnchor present. This makes it difficult to setup on XR rigs, as detailed in the issue above. This changes both classes to use CesiumGlobeAnchor components present on parent objects, while using the Reset event to still create an anchor if none is present, as was the previous behavior.