These options have obvious edge cases that can t be easily resolved.
Unity stop light going through walls.
Most of the time this works.
Then click on your light click on the culling mask dropdown then uncheck the layer the object is on.
Unity is the ultimate game development platform.
Hi i have a light source with shadows in a maze in this scene it is the only one light source.
In that case you ll need to be a bit more clever.
About 40 of the time i can drive through the walls.
You can simulate this in shaders or use raycasts to see if the light is behind a wall.
I ve sized the collider to be 0 1 larger than the section of the wall.
Trying to solve this for each wall section i added a child gameobject marked as static.
I don t fall through the floor.
Since you re using unity free put the plane on a specific layer.
This gameobject has a boxcollider on it.
Use unity to build high quality 3d and 2d games deploy them across mobile desktop vr ar consoles or the web and connect with loyal and enthusiastic players and customers.
Shadows are the obvious answer however i assume you are using lite and that s not an option.
Baking your lightmaps will fix it.
Now the light will not affect the object.
On why there is still a slight light in your scene despite the walls that s unity s environment lighting.
I am in a room where there is no light and i can see the.
You have a point light source behind some walls.
Regarding the slight light seam in the upper scene view that is an artifact of the realtime lighting.
The layers are the dropdown box in the upper right of the inspector.