hay guys.
First of all I’m a NOOB so please be mindful of that fact when choosing the answer difficulty.
I’m trying to connect the sun (directional light) rotation to a slider in a widget, the problem is that i cant directly reference the directional light (sun) actor inside the widget graph where the slider is.
How would i go about referencing an actor inside a widget graph/blueprint so i could move/rotate that actor?
U can make an actor (ASun) containing the light component and the widget component, where in the Tick method u can read the value from the widget component and update your light component
Create a variable of type *Directional Light Component *in the widget, make it *Instance Editable *and Expose on Spawn. When the BP creates the widget, you’ll see an additional pin on the node named like the variable in the widget. Plug your sun there.
Thank You for the awesome solution however, I need the blueprint start the default value from my scene. The end of the slider will be night time and from the start of the slider will be daytime which is early morning. How could I achieve this result by Blueprint?
So, referencing @Everynone’s post above, you could set Out Range A to a nice value that looks like morning (by playing with the light rotation in the editor), and set Out Range B to a nice value that looks like night.