Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently having a problem with lights in Unity. They shine through walls for some reason.

Point, directional, etc. If a light is next to a wall on one side, you can see it on the floor on the other side. I believe this has something to do with culling masks or light culling.

I was wondering how I could go about culling the lights so they no longer shine through walls. Any help is greatly appreciated.

I'm on Unity 4.x Pro, so I have all the features for that.

Here's a picture of a light on one side of the wall:

And here's it shining through to the other side, which it's not supposed to do:

share|improve this question
Free version? Dynamic lights can have no shadows in the free version. Shadows hide lighting through walls. – snake5 Dec 21 '12 at 16:37
I accept questions whenever they're right, I make sure to. I just tend to have a lot of times where no one can help me or I solve it myself. I'll post some pics, and it's Pro version. – Timothy Williams Dec 21 '12 at 16:54
So then shadows are turned on? – Byte56 Dec 21 '12 at 17:10
Yeah, shadows are turned on for all the lights. – Timothy Williams Dec 21 '12 at 17:15
How is the geometry defined? Is the wall properly connected to the floor (i.e. explicit edge), or is it just put straight onto or through the surface of the floor? – Paul-Jan Dec 22 '12 at 10:06
up vote 2 down vote accepted

I managed to fix the problem, turning the shadows to Soft Shadows, setting the strength to 1, and putting a culling mask on certain objects made the light shine on the proper surfaces and not pass through anything.

share|improve this answer

I would double check on the shadows for that particular light, that's exactly what should happen in deferred rendering when you have shadows off for a point light.

share|improve this answer
That was my first thought as well. I checked the light's shadow settings, turned it completely off, tinkered with things, etc. No matter what it always went through the wall. – Timothy Williams Dec 21 '12 at 19:10
Are you using forward or deferred rendering? – Mike Dec 21 '12 at 20:26
We use deferred rendering currently. – Timothy Williams Dec 23 '12 at 21:34

I found a trick for this problem (tested just for the spotlight)! Do the following things:

1) Set the range of illumination to just reach the wall(the strength of the light on the wall will decrease).

2) Increase the intensity as you want and you will see that the light is now illuminating just the wall and don't go through

share|improve this answer
Please refrain from writing all CAPS answers and making the complete answer bold. That is bad form. – Philip Allgaier May 20 '15 at 20:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.