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.

hey kevin
i want like this

see video

Looks cool! Do you have a specific question?

Hi Cesium team,

I’m working on a Google Earth-style application in Unreal Engine using Cesium for Unreal and I have a question about lighting behavior.

:bullseye: Goal:

I want the globe to rotate, but the sunlight direction should stay fixed, simulating how the real Earth rotates around a fixed sun (creating the day/night cycle).

:white_check_mark: Expected Behavior:

  • Earth rotates freely.
  • Directional light (sun) remains fixed in world space.
  • This mimics realistic sunlight behavior, like Google Earth or NASA visualizations.

:hammer_and_wrench: Current Setup:

  • I’m using the CesiumSunSky actor.
  • Globe is rendering fine.
  • I noticed that as I rotate the Earth, the sunlight seems to stay in the correct world direction — but I want to confirm:
    • Is this the intended behavior of CesiumSunSky?
    • Do I need to manually update the sun direction or is it handled automatically?

:red_question_mark: Questions:

  1. How does CesiumSunSky keep the directional light synced with real-world sun?
  2. Is there a way to lock the sun direction so that it always simulates real-world sunlight, even when the user moves/rotates the globe manually?
  3. What is the best way to simulate real-time day/night cycle for a rotating globe?

:wrench: What I’m Trying to Achieve:

I want to rotate the Earth manually (e.g., via user interaction), and the lighting should behave exactly like in Google Earth — where the Earth rotates, but the sun stays fixed in a real-time direction.

Thanks in advance for the help! Looking forward to building something beautiful with Cesium

@Piyush_Verma I believe I’ve already answered those questions. If you have followup questions, or if something specific wasn’t clear, let me know.