# Get Sun to Follow Directional Light During Day/Night Cycle.

**URL:** <https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576>\
**Category:** Rendering\
**Tags:** light, sun, unreal-engine, dynamic, day-night-cycle, question\
**Created:** [March 26, 2014, 9:32pm UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576 "2014-03-26T21:32:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lawrie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lawrie](https://forums.unrealengine.com/u/Lawrie)\
**Post date:** [March 26, 2014, 9:32pm UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/1 "2014-03-26T21:32:02Z")

</div>

Ok, so i have tried to figure this out a bit more and think i have something… the directional light cycles and you can see it with lighting changes… however the actual sun on the sky sphere doesnt move. When i hover over the 'Directional Light actor ’ property on the sky sphere, it says a description but i cant tell whether it will work… Anyone have any ideas on how to move the sun in the sky to follow the directional light?

Thanks, any more help would help.

Heres some pictures if it helps.

[Screenshot - afaba085a5bf3875cf0b38de842dd239 - Gyazo](http://gyazo.com/afaba085a5bf3875cf0b38de842dd239) [Screenshot - ace2e7316eae37e69df8c047926f6a4a - Gyazo](http://gyazo.com/ace2e7316eae37e69df8c047926f6a4a) [Screenshot - a037b34c552043df9a3b467b15a92a53 - Gyazo](http://gyazo.com/a037b34c552043df9a3b467b15a92a53)

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [March 26, 2014, 9:53pm UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/2 "2014-03-26T21:53:55Z")

</div>

I am currently looking into this as I have done the sun already moving across the sky the new thing to notice is that the skysphere is actually a blueprint and not just a sphere.

I am writing a tutorial and video which you can follow I want to make it complete with possibly using their skyblueprint example.

So the current point now is to either adjust the blue print or put a static mesh in place of it with a sky material you will find that if you delete the BP\_Sky\_sphere from the level you should see your light moving.

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [March 27, 2014, 2:20am UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/3 "2014-03-27T02:20:04Z")

</div>

Ok if you are working in a level blueprint all you need to do is place a reference to the skysphere in there and then wire off it and there should be a UPDATE SUN DIRECTION

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [March 27, 2014, 6:05am UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/4 "2014-03-27T06:05:36Z")

</div>

I just got it updating with a simple custom Day/Night BP. You just attach your Direct Light (Set to Movable) and BP Sky Sphere to the two varibles and drop it into your level and boom, updating shadows w/ moving sun along with the nice sky sphere.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/4/ab40deb51ac24b8ac81b83e10e2e4099af390782.png) ](https://dl.dropboxusercontent.com/s/zvwe6olvt33hwvi/DayNightBP.png)  
[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/1/5d1cb842507b94f72ba2be7d0dc7bd02858d7f78.png) ](https://dl.dropboxusercontent.com/s/9cp44jac2dp114t/DayNightTimeline.png)

Hope that works for ya!

---

<div class="post-metadata">

**Author:** ![Lawrie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lawrie](https://forums.unrealengine.com/u/Lawrie)\
**Post date:** [March 27, 2014, 8:25am UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/5 "2014-03-27T08:25:10Z")

</div>

Thank you very much !

---

<div class="post-metadata">

**Author:** ![Lawrie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lawrie](https://forums.unrealengine.com/u/Lawrie)\
**Post date:** [March 27, 2014, 8:28am UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/6 "2014-03-27T08:28:25Z")

</div>

Thanks, especially for the pictures of it… it works well, the only thing i dont have is the ‘SET’ node… as i cant quite figure out where it is… but it still works and is GREAT. Thanks alot!

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [March 27, 2014, 3:08pm UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/7 "2014-03-27T15:08:16Z")

</div>

The set comes from dragging off the sun var and then typing set in the search box that pops up. If need be I can create a tiny little video tutorial. Also, I created a forum thread on it. I’ll likely try and update it to make it a bit more drag and drop and even try to get it to update a skylight AO.

Forum Link:

> **[Working Basic Day/Night Cycle w/ Updating sun](https://forums.unrealengine.com/showthread.php?1237-Working-Basic-Day-Night-Cycle-w-Updating-sun)**
>
> Hey folks, after a bit playing in the BP system I was able to create a basic day/night cycle. It even updates the sun’s position in the BP\_Sky\_Sphere, so you’ll still get the nice color changes around the horizon. You just have to attach your...

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [March 27, 2014, 3:22pm UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/8 "2014-03-27T15:22:17Z")

</div>

Nice spoiler.

I had this completed but took it further with the tutorial I have written so that you can see step by step what is going on and also give you more control over the scene.  
Hope you understand the concept of what Nbazzeghin has setup and glad you are all set.

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [March 27, 2014, 3:29pm UTC](https://forums.unrealengine.com/t/get-sun-to-follow-directional-light-during-day-night-cycle/278576/9 "2014-03-27T15:29:56Z")

</div>

Very Cool! I cant wait to see what you’ve come up with. The BP system is awesome.
