Download

Day/Night Cycle

Hey Guys,

I hope I’m posting in the right place. Anyway, I have a simple day/night cycle set up that works perfectly, but I can’t set it up so that when it turns to night-time, all of the point lights and/or spotlights come on.

Can anybody recommend any solutions? I have attached my BP for reference.

Thanks!

a5ddec49b7f819c988dc8847ae18800f35646b66.png

Hi
Sorry for my English

  1. Create a GameInstance to store a bool variable (ex: IsDay)
    Exemple: UE4 - Using Game Instances & Persistent Variables - YouTube

  2. Get Sun height from pitch
    2055718e91184b87b0f39e1acae78054016b1989.jpeg

  3. When SunHeight is >0 => set booll variable IsDay to true
    ddebe531eebc0ed53aac25d74e16e91e7e34099f.jpeg

  4. Create BP that get value of IsDay to control Lights or other objects
    3815e562ac4a438663f1b996c88ae1ecff7b6b95.jpeg