Flashlight is very bright when standing near a surface

So we get our location and our forward vector, which is one meter in front of us at all times, and multiply that by 1k to get a 1,000 meter range. Then if the line trace hits something we get our location again minus what the line trace hit location and get its length. and from there you can do it a few ways either by branching. if wall is this far darken. Or create some math where your light will work normal without hitting anything and slowly decreases the power as you get closer.