In no signal, I have a mechanic where the sides of a room can disappear when the player is behind them so the room can still be seen. In one of these situations in the ceiling, there was a hole which allowed the light from a Light3D with shadows enabled to pass through. When the ceiling was hidden, the shadows acted as if the ceiling wasn’t there, which was undesirable.

I tried fixing this by changing the VisualInstance3D to be on a different layer that the camera couldn’t see, but this didn’t fix the issue. I also changed light_cull_mask for the Light3D, but this didn’t work either since it appears to only control what surfaces the light ends up on.

Looking this up online, I find out that the solution is to create a GeometryInstance3D that has its cast_shadow property set to SHADOW_CASTING_SETTING_SHADOWS_ONLY:

Calinou @ forum.godotengine.org: Select your MeshInstance node, go to the Inspector’s GeometryInstance section then set the shadow mode to Shadows Only.

Make sure your mesh doesn’t have a transparent material attached to it. Otherwise, it won’t cast any shadows.