Spotlight lighting objects outside area light is being shown on

Ok so i’ll try to explain this question as best as I can. I have an FPS character holding a “flashlight” a.k.a a spotlight. The problem is, the direction the spotlight is shining is lighting up objects (trees, haven’t tried other objects) outside the beam of light. I have been searching everywhere for answers how to resolve this and I have been altering the intensity of the light, the angle of the light, etc… So if someone is willing to help, that’d be fantastic. Thanks guys.

There’s several simple fixes for this. i’m not 100% sure what you mean, so I’ll provide several answers for the different possible scenarios.

1) If you are using Unity Free, objects WILL NOT block the light beam.
for example, if you shine the whole spotlight into a block, it will still illuminate the block behind it. This is because realtime shadows are disabled in Unity Free.
alt text

2) If your flashlight intensity is acting funny and not ending where it should, you could try various ways to work around this. For example, fog. It’s one thing to turn the Ambient Light all the way down so it looks dark, but often, it helps a little to mix a dark fog in there as well. I assume with this case, you might be going for a Slender-like approach on the darkness, so, you can take these approaches to solve the problem.

Step 1: Lower the ambient light.
alt text

This will darken the world and geometry enough so the light stands out nearby.

Step 2: Add a dark fog.
alt text

This will provide an ambient darkness that fades your flashlight. If you want the flashlight to fade for the following effect, try these Linear Fog settings.
alt text

All in all, the results are a varying darkness.
Without the fog, your fhashlight fades on itself, but if told not to fade, your flashlight will keep going. Like so;

alt text

When coupled with the fog, it created a simple and nice blended fade for the spotlight.
Like so;

alt text

Fiddle with the fog on your own time, make sure it’s just right! I hope this helped. Good luck!

Regards,
-Itami