How to Keep Sun Direction Fixed While Globe Rotates in Cesium for Unreal?

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

Hi @Piyush_Verma, this looks similar to the thread you previously opened here:

Can you pick which thread you’d prefer to discuss on so we don’t duplicate our answers? Thank you!

This one because I clear my question