Might be a bit off because it’s late and I’m not actually on engine at the mo.
Open normal level, with that floor mesh and delete the directional light in the editor
Setup an actor blueprint
Component tab
Add spring arm
Set arm length to something like 1000 (experiment :changes sun distance from level)
Add 2 static mesh components(e.g. Sphere mesh) such as sun/ moon (and have premade materials)
Drag and drop static arm mesh into spring arm to attach it
Add directional light component
Event graph
Create “time” var(float)
Get tick node
Drag pin, set “time”=“time”+deltaTime (off tick node)
Drap pin off tick node tree (off the time add time thing), get a add local rotation node, set the target to “sun(static mesh)”, set rotator value to 0, 0.1,0 ( I think pitch) (can change for sun movement speed)
event begin play node
Set moon location (experiment with the value, make sure the Z is positive for it to be seen above you)
Back to tick graph
Set direction light rotation, to get rotation: get sun location , find look at rotation and set to rot of directional light
(^may be a little wrong, try)
Then drag pin, branch node
Drag off red condition and get less than (float) and put bottom value as 1
Get reference to spring arm, get rotation, break rot, get pitch, from that get divide float node, set divide by 360
From that pull off and select floor, then take the floor value away from the float at the end of the last instruction^
Connect to less than 2 line above
From true on branch get set moon visibility false
From flase pin: set moon visibility false
(^moon transition will be awful)
(^ look into opacity and setting the value of the moon opacity as a fade in with dynamic material)
For seasons
Set a time length for which you want each season to be, and check the current time from “time” float, then set to next season, maybe spawn snow, leaves ect