Now the light will not affect the object.
Unity light going through walls.
You can simulate this in shaders or use raycasts to see if the light is behind a wall.
Set the point light s baking property to mixed or baked then bake your lighting data using the lighting tab.
Although you have enclosed the light indirect light from the light source seems to seep through especially on the ceiling and the floor.
If either of these don t solve.
I am using gaia for the terrain and have the lighting set to afternoon light for those familiar with the program.
In that case you ll need to be a bit more clever.
Create a unity primitive cube plane etc sized similarly to your wall remove its collider and in the mesh.
Although you have enclosed the light indirect light from the light source seems to seep through especially on the ceiling and the floor.
Since you re using unity free put the plane on a specific layer.
Hi all i have a basic pb building and in each end of the room the directional light seems to be shining through the walls even though i have shadows set to two sided.
Shadows are the obvious answer however i assume you are using lite and that s not an option.
Light passing through walls 1.
Here is how to fix it.
These options have obvious edge cases that can t be easily resolved.
Then click on your light click on the culling mask dropdown then uncheck the layer the object is on.
You have a point light source behind some walls.
The layers are the dropdown box in the upper right of the inspector.