Make light not go through objects in BGE.

So I have a simple point lamp on top of a building and you can see that the light goes through into the building. How do I make it so that the light will not go through objects?

Use a spot light…

…and enable buffer shadows (ray shadows won’t work).

… If you’re using GLSL. In addition, you could use the distance value with the “Sphere” button set.

Ok thanks SolarLunar and torakunsama it didn’t work with any light.

Are you using GLSL?

Yes I am using GLSL