How to Fix the Sun Direction and Rotate the Globe Like Google Earth?

Hi everyone,

I’m trying to recreate a behavior similar to Google Earth in Cesium for Unreal. In Google Earth, the sun remains fixed in world space (as if it’s far away and stationary), and the Earth rotates underneath it to simulate the passage of time (day/night cycle).

By default, CesiumSunSky updates the sun direction over time using the UpdateSun() method. However, what I want instead is:

  • :sun: Keep the sun’s direction constant in the sky (don’t update its azimuth/elevation).
  • :globe_showing_europe_africa: Rotate the Earth (or camera around the Earth) to simulate time passing, like in Google Earth.

I’ve disabled sun updates and set a constant SolarTime, but I’m unsure of the best way to simulate the Earth’s rotation:

  • Should I rotate the CesiumGeoreference Actor?
  • Or rotate the camera around a fixed point?
  • Are there side effects I should consider when rotating the georeference?

Any best practices, example Blueprints, or other tips would be greatly appreciated!

Thanks in advance.

Hi @Piyush_Verma,

Yes, I’d suggest making sure that the Cesium3DTileset and other Cesium Actors are parented to the CesiumGeoreference Actor, and then modify the Rotation of the CesiumGeoreference Actor. That will change the orientation of the globe in the Unreal world. For the sun position, you’ll have to set Solar Time appropriately based on the current rotation. As far as I know, there’s no way to keep the sun position fixed as you rotate the globe, because the Unreal SunSky component moves the sun around the Earth (based on the Solar Time), not the other way around.