How to use DirectionalLight3d to cast a shadow onto a Sprite3d without compromising color consistency?

Godot Version

Godot Engine v4.2.1

Question

Hi. I’m making a 2d-style game in 3d. I want my character to cast a shadow on the ground so that when they jump around you can tell where they are.

So I have a DirectionalLight3d pointing straight down, and “shaded” enabled on the sprite that represents the ground. This works, but it has the unintended side effect of altering the coloration of the sprite.

shaded enabled:

shaded disabled:

I would like to prevent this so I can stay within a certain color palette. Thank you

If you want to create the shadow effect without lights, I recommend using a decal under the player. It achieves the same effect apart from needing to draw the shadow yourself.

1 Like

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