How to make invisible roof that casts shadow.

So I am making a game that looks like this (it’s a prototype right now).

I would like to make it to where there is an invisible roof so you don’t see the wall’s shadow. How do I do that?

-The sun rotates over time because there is a day-night cycle.
-I tried having the camera’s culling mask ignore the roof, but that didn’t work.

There are probably many ways to do it.

The first thing that comes to mind is: Create a plane for the ceiling where the normal points downwards. You should be able to see through it from above due to regular backface culling. Then turn on two-sided shadows for the plane.

  • Create a plane.
  • Go into the Mesh Renderer component.
  • Click the dropdown for shadows and select “shadows only.”

The fact that nobody told you about this property in 8 days proves these forums are dead and useless.

1 Like

Haha, I even linked the page and didn’t see the option.