I’m trying to set a “stationary” light source to turn on (Visibility: on Intensity: 0) as soon as the player steps into the trigger box and the intensity slowly grow as he grows closer to the light source.
So far I have tried doing a variable that depends on the distance between the character and the light source. This variable called “distance” is then substracted 1200 (half the distance of the trigger box so that it starts at 0) and then multiplied by 3 or 4 so that the end intensity would be 4800.
The problem lies that the light only turns on at the end intensity and doesnt scale up or down as I move towards or away from it. I also wonder if there is a way I can set a maximum number allowed so that I could cap the intensity growth midway to the light source as I would like to give the player an area around the light that would allow them to move around without the light jumping up or down.
Here is what I have come up with but is not working…
Thanks for any help in advanced!