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.
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).
Expected Behavior:
- Earth rotates freely.
- Directional light (sun) remains fixed in world space.
- This mimics realistic sunlight behavior, like Google Earth or NASA visualizations.
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?
Questions:
- How does
CesiumSunSky
keep the directional light synced with real-world sun? - 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?
- What is the best way to simulate real-time day/night cycle for a rotating globe?
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