Shadows passing through objects, why?

Hi, I’m using Unity 2018.2.17f1 without HDRP or LWRP. Just a regular base.

I have this problem when there are objects one above other one and the directional lightning set up like this.



The shadow of the object above the cube is passing through this cube and causes shadow to be visible on the cube way below (see screenshot).



What’s wrong with my lightning/shadows/materials or something else. I’ve spent a lot of time trying to figure it out and I have no idea what’s wrong.

Thank you for your help.

I believe this might be an issue with your model, I may be wrong but looking at it The only model with the issue seems to be the one it is coming from, Alternatively You could add a different rotation to your directional light though I feel this might ruin the whole look of your game a bit.

I have same issue, did you fixed it?

I found this answer: unity game engine - Shadows going through objects - Stack Overflow
I wasn’t able to find the necessary shader, but I think it might work for you if you can.

Many years later now, and I ran into this same issue. In my case, the problem was that the floor itself was supposed to be casting the shadow which would cover up the shadow of the dynamic object. This is probably the line of investigation you should go down.


There are many reasons why this may be happening, but in my case it’s because the floor was a static object whose shadow was cast using the lightmapper, while the dynamic object’s shadow was… Realtime (i.e. Lighting Mode: Subtractive).


The lightmapped shadow coupled with the floor’s lightmap resolution being too low to display a proper shadow caused the dynamic shadows to show up where the floor’s shadow should be instead. Once I had the static object’s shadow properly cast, this was no longer a problem