Problem with UI interactions with light.

Hello guys,

So, I’m trying to make a UI to change light Intensity and Temperature, especific for a group of lights that I want to interact in game.

I was able to make the lights turn on and off setting a collision box and especifing each “group” should be lighten with a Actor tag. And was able to make a widget with the sliders to change the values.

But now, I’m not having sucess on making this modifications.
I don’t know if I was able to explain.



Sorry guys, I think i messed in the lasts lines.
I’m not being able to input the values of the sliders in the lights that are meant to be modified, and when I do, it just change for a single set of lights. When I try to modify others sets, It doesnt work

Please move the get all actors of class to either a begin play for actors or on construct in the case of widgets and make the outcome promoted to a variable.

Get all actors of class is a very expensive call to be making per value change. Just loop through the variable array on change.

You are also only changing the first element in the array (the get [0] node). You should be doing a for each loop from the array and setting it per entry.

Same thing with get all actors with tag…cache it to a variable.

1 Like

Heey, Thanks for replying!

I’m couldn’t fully understand how to do everything you said. If you could be more especific it would be amazing. Sorry for it.

How could I make the element in the array loop with my selection ?


Hope you meant that, its right ?

The for each loop needs to be called between the on value changes and the set

1 Like

Niice, already could interact, but it isnt on real time yet, i’ve had to click to interact again to refresh the modification made into the light. And it would make different sets of lights to change as well, there is someway to make the changes just in the lights I’m setting ?

edit: Fixed Light save function on change

RoomLight.zip (1.6 MB)

Demo

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.