How to create realistic 2d shadow effect

hello–i’m trying to implement a realistic shadow effect for my 2D character sprite (example below):

image

instead of just making the sprite have the shadow and ball together, i’d like to make the shadowing realistic, so that the shadow will always appear to the bottom left of the (as if a “real” light was shining on it):

image

as you can see, the ball was rotated 45 degrees to the left, but still has an accurate shadow underneath.

i hope i didn’t make this sound more complicated then it really is–the ball’s “shadow” is just a black circle under the red/green ball with the opacity turned down.

how can i achieve this? thank you.
let me know if i can clarify anything.

Look into the shadow layer effect.

1 Like

thanks for the reply. is this what you’re referring to?
image

1 Like

Yes @Silver-Streak is referring to that

1 Like

You could also try having a separate shadow sprite, and then keep changing it’s X and Y position to that of the ball (plus or minus the bottom left offset), and then make it a Z order lower than the ball.

2 Likes

this sounds perfect, thank you.

There is an extension shadow clones give it a try maybe than helps

I used here on each car and it works pretty well
https://www.crimsongames.io/game/racealia-enjoy-racing-to-the-max-a-gdevelop-5-template-38

i’m not looking for how to make shadow clones, i was looking for how to make an accurate shadow effect. thanks nonetheless