Time based Sun Rotation

Hello,
I am trying to get a time-based sun rotation.
Which means I have a time variable which increases every second (in game second not real second).
Now I want to rotate my light sources according to this variable.
Since I do not come to any solution, I decide to ask this question here.

I would recommend instead creating a timeline node, and within that timeline add a vector variable. Use the vector to set your rotations across the 3 axis according to the timeline. Then break the vector variable from the timeline node and connect x,y,z into a make rotator node, which feeds into SetWorldRotation.

Just have the Update exec pin from the timeline go into the SetWorldRotation node and it will correctly update the rotation according to the timeline.

Timelines are great, as you can set the length of the timeline along with multiple variables such as a float for SunIntensity.

You can also use SetPlayRate to alter the duration of the timeline without altering the timeline itself. So if you made your timeline take 10 seconds to complete, a SetPlayRate of 0.5 would take 20 seconds, 2 would take 5 seconds.

You can also use the SetNewTime on the timeline node in order to teleport the timeline to the set float duration if you say, wanted to start in the afternoon or warp to daytime after “sleeping.”

That helped me. Thanks!

As Deathstick say:

I would recommend instead creating a timeline node, and within that timeline add a vector variable. Use the vector to set your rotations across the 3 axis according to the timeline. Then break the vector variable from the timeline node and connect x,y,z into a make rotator node, which feeds into SetWorldRotation.Just have the Update exec pin from the timeline go into the SetWorldRotation node and it will correctly update the rotation according to the timeline.Timelines are great, as you can set the length of the timeline along with multiple variables such as a float for SunIntensity.You can also use SetPlayRate to alter the duration of the timeline without altering the timeline itself. So if you made your timeline take 10 seconds to complete, a SetPlayRate of 0.5 would take 20 seconds, 2 would take 5 seconds.You can also use the SetNewTime on the timeline node in order to teleport the timeline to the set float duration if you say, wanted to start in the afternoon or warp to daytime after “sleeping.”