Am I doing something wrong with the SpotLight3D, or is it a limitation of Godot?

Godot Version

3.5, 4.2, 4.3

Question

Hello! I was trying the SpotLight3D on Godot 4 (tested on 4.3 dev 2 and 4.2.1 official), and its light passes through meshes, an unwanted behavior. That happens on Godot 3.5 (the version I’m actually using), but although I thought it was a limitation on 3.x versions, that actually happens on the most recent versions as well (Forward+ renderer and all).

I tested the same setup on the discontinued Blender Game Engine, which supposedly has worse graphics capabilities, by it works as expected.

As I’m using Godot 3.5, my goal was to make a character shadow going downwards while the scenery shadows go diagonally, but shadow layering is not supported AFAIK, so I wanted to fake these shadows using a SpotLight3D with negative light. I explained the process in details in this post:

It works as expected like this:

However, when the player is on a platform, the light/shadow passes through it.

Am I doing something wrong? Is there a setup on Project Settings or layers or who knows where to fix this, or is it a limitation by the engine, be it 3.x or 4.x?

Thanks!

What are the Shadow settings? Your first screenshot has that block folded. That’s the important part. =P

1 Like

Enabling the shadow on the spotlight was the fix, I can’t believe I overlooked something so simple. :sweat_smile:

Thank you so much! :pray:

Setting up 3D scenes is a lot and you are bound to miss something. It happens to all of us.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.