How to create a BP Light/Lamp that turns on/off automatically at day/night cycle

when i remember corectly you have a variable in the enhanced skydome you are using wich tells you the “time of the day” the one that counts up to the DAY variable have you tried using that one?

you could export the sunrise and sundown variables from the skydome so the lamps can access it as well, that way you wont have to edit the variables by yourself.

And another idea for you to investigate would be to do the following.

Calculate the radius of pos 0,0,0 to the actual sunposition using simple math

fd875d66039fb284e31384dfef897bf17f19e93f.jpeg
sin(a) = A / C

Pos 1 (0,0,0) this is at a
Pos 2 (x,x,x) this is at b (upper right corner :wink:

A is simply the current vector of the sun * (0,0,1)
C is the VectorLength of Pos2-Pos1

now simply you want a you do asin(A / C)

and you get a acurate angle wich you can use to calculate

90°-0° day