# Trying to rotate my sun

**URL:** <https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 25, 2014, 11:14am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239 "2014-04-25T11:14:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![siryazan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@siryazan](https://forums.unrealengine.com/u/siryazan)\
**Post date:** [April 25, 2014, 11:14am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/1 "2014-04-25T11:14:29Z")

</div>

Hello everyone,

I am trying to rotate my sun but it doesn’t really work.

When I rotate my sun (directional light), the light changes but the actual sun in the sky sphere doesn’t move. Does anyone know how to fix this because it looks weird if it’s night, yet there’s a sun in the sky.

Thank you in advance,

Yaz

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_923c79df](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_923c79df](https://forums.unrealengine.com/u/anonymous_user_923c79df)\
**Post date:** [April 25, 2014, 12:43pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/2 "2014-04-25T12:43:03Z")

</div>

I will move this thread into the bp section of the forum. 🙂 -\> take a look at the wiki, I think there you can find a day/night cycle tutorial which will explains how to change that [https://wiki.unrealengine/Main\_Page](https://wiki.unrealengine/Main_Page)

---

<div class="post-metadata">

**Author:** ![DempaG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DempaG](https://forums.unrealengine.com/u/DempaG)\
**Post date:** [April 25, 2014, 1:19pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/3 "2014-04-25T13:19:52Z")

</div>

YOu will have to rebuild the lightning for the actual “sun” to move. At least that’s my solution. Ifyou’re gonna change it’s rotation ingame with a blueprint you have to get a reference to the SkySphere and “update the sun direction” on that one too!

---

<div class="post-metadata">

**Author:** ![siryazan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@siryazan](https://forums.unrealengine.com/u/siryazan)\
**Post date:** [April 25, 2014, 3:02pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/4 "2014-04-25T15:02:33Z")

</div>

Thanks guys, I’ll try it out 🙂

---

<div class="post-metadata">

**Author:** ![siryazan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@siryazan](https://forums.unrealengine.com/u/siryazan)\
**Post date:** [April 25, 2014, 3:23pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/5 "2014-04-25T15:23:11Z")

</div>

> [@;23056](#):
>
> I will move this thread into the bp section of the forum. 🙂 -\> take a look at the wiki, I think there you can find a day/night cycle tutorial which will explains how to change that [https://wiki.unrealengine/Main\_Page](https://wiki.unrealengine/Main_Page)

Hey, I followed the wiki guide and I managed to create a day/night cycle, BUT when I manually try to rotate the sun it still doesn’t work. The light changes appropriately, but the sun does not move along so it looks very weird still. :S Any idea on what I could do? Thanks man!

EDIT: My work mate just tried to do it himself and it didn’t work for him either. Could this be because of the recent update?

---

<div class="post-metadata">

**Author:** ![ActualZak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ActualZak](https://forums.unrealengine.com/u/ActualZak)\
**Post date:** [April 25, 2014, 3:47pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/6 "2014-04-25T15:47:20Z")

</div>

If you’re using the default Sky Sphere Blueprint we included, notice that you have to hit the “Refresh Material” checkbox to update the sky in the editor. That’s your giveaway - that means something needs to happen in order to update the sky.

If you open that Blueprint, you’ll see that there is a custom Function called UpdateSunDirection. Go into the Event Graph. Create an “Event Tick” node. Connect that to an UpdateSunDirection function call. You could put a delay on this for performance reasons, especially if your sun moves slowly (as it probably should). Now, if you animate your Light Source (make it moveable!!), the material sun will always move with it.

This is super fast to set up. Give it a try and let me know how it works.

EDIT: Oh, and before I forget, unless you use Delta Time from the tick to help control how much you rotate, then your sun will probably speed up and slow down based on hardware performance! You may or may not notice that depending on how fast the sun is moving, but it’s worth a mention.

---

<div class="post-metadata">

**Author:** ![gregdumb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gregdumb](https://forums.unrealengine.com/u/gregdumb)\
**Post date:** [April 26, 2014, 1:41am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/7 "2014-04-26T01:41:15Z")

</div>

FYI, unlike UDK, the visible sun in the sky is actually separate from the lamp, it’s a just white disk shape on the sky’s material. The sky material/blueprint is cleverly designed to position this disk using the sun’s rotation. As Zak said, the material won’t update unless you press that box.

I’ve got a tutorial/template related to this kind of thing [here](https://forums.unrealengine/showthread.php?1613-Tutorial-Quick-Time-of-Day-Setup), in case you’re interested.

---

<div class="post-metadata">

**Author:** ![siryazan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@siryazan](https://forums.unrealengine.com/u/siryazan)\
**Post date:** [April 28, 2014, 7:50am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/8 "2014-04-28T07:50:14Z")

</div>

> [@Zak Parrish;23146](#):
>
> If you’re using the default Sky Sphere Blueprint we included, notice that you have to hit the “Refresh Material” checkbox to update the sky in the editor. That’s your giveaway - that means something needs to happen in order to update the sky.
> 
> If you open that Blueprint, you’ll see that there is a custom Function called UpdateSunDirection. Go into the Event Graph. Create an “Event Tick” node. Connect that to an UpdateSunDirection function call. You could put a delay on this for performance reasons, especially if your sun moves slowly (as it probably should). Now, if you animate your Light Source (make it moveable!!), the material sun will always move with it.
> 
> This is super fast to set up. Give it a try and let me know how it works.
> 
> EDIT: Oh, and before I forget, unless you use Delta Time from the tick to help control how much you rotate, then your sun will probably speed up and slow down based on hardware performance! You may or may not notice that depending on how fast the sun is moving, but it’s worth a mention.

Thanks for the reply!

I tried ticking Refresh Material, but it didn’t work for some reason?

I have also done the tutorial by Tesla on time of day in UE4, and it works. The sun rotates slowly as time passes, but still, I cannot rotate it the way that I want. I am not sure if that is what you meant me to do, because if yes, then I’ve tried it already 😕

---

<div class="post-metadata">

**Author:** ![siryazan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@siryazan](https://forums.unrealengine.com/u/siryazan)\
**Post date:** [April 28, 2014, 7:57am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/9 "2014-04-28T07:57:52Z")

</div>

> [@gregdumb;23386](#):
>
> FYI, unlike UDK, the visible sun in the sky is actually separate from the lamp, it’s a just white disk shape on the sky’s material. The sky material/blueprint is cleverly designed to position this disk using the sun’s rotation. As Zak said, the material won’t update unless you press that box.
> 
> I’ve got a tutorial/template related to this kind of thing [here](https://forums.unrealengine/showthread.php?1613-Tutorial-Quick-Time-of-Day-Setup), in case you’re interested.

Thank you, I think I’ll give that one a shot if the thing I’m working on right now doesn’t work out in the end. Cheers!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c35761f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c35761f](https://forums.unrealengine.com/u/anonymous_user_0c35761f)\
**Post date:** [April 28, 2014, 5:14pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/10 "2014-04-28T17:14:11Z")

</div>

Newbie question. How do I remove the sun? I realized after the fact I should have chosen the blank blueprint, but now I just want to remove the sun so I can have lights that actually work in my top down. Thanks for the help

---

<div class="post-metadata">

**Author:** ![gregdumb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gregdumb](https://forums.unrealengine.com/u/gregdumb)\
**Post date:** [April 28, 2014, 7:13pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/11 "2014-04-28T19:13:30Z")

</div>

> [@RobertJS3;24500](#):
>
> Newbie question. How do I remove the sun? I realized after the fact I should have chosen the blank blueprint, but now I just want to remove the sun so I can have lights that actually work in my top down. Thanks for the help

Deleting the directional light in the level should do the trick. Just make sure you rebuild lighting afterwards. 🙂

EDIT: Actually that doesn’t seem to work. I think you need to edit the sky material to remove the sun disc part.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c35761f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c35761f](https://forums.unrealengine.com/u/anonymous_user_0c35761f)\
**Post date:** [April 28, 2014, 9:33pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/12 "2014-04-28T21:33:42Z")

</div>

Ok I will try editing the sky material. Thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8547e48a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8547e48a](https://forums.unrealengine.com/u/anonymous_user_8547e48a)\
**Post date:** [November 3, 2014, 2:13pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/13 "2014-11-03T14:13:20Z")

</div>

> [@Zak Parrish;23146](#):
>
> Zak Parrish. notice that you have to hit the “Refresh Material” checkbox to update the sky in the editor.

Doesn’t work for me in the installed UE4 4.5.1 However in the Github Built latest engine it does work. I think there is a problem with a specific update. should get it fixed cause its one of the first things noobies try to do by themselves, and is a great self esteem blow if something doesn’t work on the very beggining.

---

<div class="post-metadata">

**Author:** ![NickZucc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickZucc](https://forums.unrealengine.com/u/NickZucc)\
**Post date:** [May 28, 2015, 4:49am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/14 "2015-05-28T04:49:19Z")

</div>

Zak, Thanks for the tip on this. This work and updates in game for me, but I would like to rotate the light in the editor and have the sun auto update while (or after) rotating the light. I added the refresh button and that works, but it is kind of a pain to always re select the blueprint and then hit the button every time you move the light. Any help on this would be great! Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ba946294](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ba946294](https://forums.unrealengine.com/u/anonymous_user_ba946294)\
**Post date:** [September 4, 2015, 1:46am UTC](https://forums.unrealengine.com/t/trying-to-rotate-my-sun/3239/15 "2015-09-04T01:46:25Z")

</div>

Hello

I am trying to rotate a sun following the unreal tutorial. The sun rotates and I didn’t create a class BP. I just want the sun to rotate after the player enter a trigger zone. Only problem, the sun rotate from another location that its default location from where I placed it (zenith). After placing the BP skysphere that I am using, I modify the sun height to 1 value so the sun it’s at the zenith. However, it’s start its rotation from a lower location. Any advice how to fix this? I believe it’s a getting and setting location problem? Or get a sun heigh variable? kinda lost here. Thanks for the help 🙂
