how to make a flashlight that only turns on in dark places without box collision and trigger

Show me please blueprint or something maybe some video or something else

I would do a sphere trace for objects, break the hit result, if its a light and nothing is in the way


something like this

Actually after thinking about it for a second it’s probably better to just do a line trace towards the nearest light source after finding out what that is with a sphere trace