How to get the exact value of where a Lightsource ends

Hello again!
Second question I’m asking today. But I’m working on a Light-Shadow-system like thief (but much dumber since I’m a beginner ^^; ) The question is, how do I know where a Light ends exactly? I want to have graduating noticablity depending on how far the player is away from the light (since lightsources get worn out with distance - at least if they’re soft). Right now I’m just using a sphere or cone (depending on the light source shape) to check if the player walked into the light. But my problem is that I always have to use trial and error to see how big the radius of the cone / sphere has to be to make sense .
So my question is, if there is any possiblity to do this by exact calculation? I would like to avoid c++ code (if its possible), because I don’t know anything about c++ and this project is on a deadline. >.<

Thank you in advance!

Hi man ,
I dont know if there is a perfect way to do it.
The only thing i can think is , build up a Grid 3x3 around your character. and from every point of the grid you cast a ray to the near lights. So you will have a number of light visibles for every point . and you can calculate a nice float curve about the “light” around you char.
Sure for every light you can check the distance and the value of intensity to know how much it lightup your pose.
Plus you can also think to dont use a loop to do this , but instead make an array and use the tick event to cast just 3-4 light controll for tick , so you dont kill your game with too much calculation at every frame. that are not necessary

Thank you! Really interesting Idea, I will try it out and let you know if it worked or not, or with what I settled in the end! :smiley: Thank you for the help!