Can sprites have shadows

Can sprites have shadows, and what solution should be used?

sure.


Babylon.js Playground

2 Likes

Sprites can’t generate shadows, but as @CodingCrusader demonstrated, you can use planes instead of sprites if you want to generate shadows. If you activate billboard mode, the behavior will be closer to that of sprites:

2 Likes

If you are creating a 2D scene/game you can simply draw another “shadow” sprite behind the actual sprite. This involes some calculation where to position the “shadow” sprite and how to scale it.

1 Like