The shadow is now rendered, but now I need to offset it.
Move the shadow node.
Now that the shadow’s been cast…how would I stack shadows on top of other objects that also cast shadows?
Umm, that wasn’t the part of the original question. I thought the intent was to avoid casters casting on each other. You can just add a child shadow sprite to every casting object or use 3D.
Perhaps upgrade the mockup to a full-screen mockup that shows the exact behavior and recurrence of the effect in a whole game context.
Sorry I hadn’t made that clear.
The behavior would look something like this:

Why is the shadow getting shorter?
To signify the left platform is sinking in.
It’s a 3D game then, so use 3D.
But there is no 3D in my project; everything is 2D.
If something is sinking into the screen then that’s the third dimension. Ditto for casting shadows onto something that is further into the screen. This can be faked to an extent but if you insist on spatially correct shadows you’ll need to go 3D.
Spatially correct shadows are not a concern.
What is a concern then?
By now you’ve been given enough options to implement pretty much anything.
I made you an entire project showing how you can combine the two with very little effort. I think @normalized’s point is at this point you are making things much more difficult for yourself.
To me, 3D is a last resort for this sort of thing; this idea was born out of a desire to source shadows for certain objects from the textures of other objects, and the shadow’s different parts are unique textures.
If I weren’t so…insistent on making this in 2D only, then I’d go for this in 3D as well.
I’ll check the project out to see what can be gleaned from it. And yeah, you’re probably right about my making it harder for myself…
I’m sorry.
No need to apologize, it’s on you now. As @normalized pointed out, there’s not much we can do to help you. We’ve already given you the answers.
I’ll see what I can do to get this effect.
You haven’t really described your concept clearly and completely. You started with one vague question, got the workable solution, then moved the goalposts, added more demands etc…
You’re wasting time this way. If you want an actual workable solution, describe your concept in its entirety and make a full screen 1:1 mockup that looks exactly like the game and demonstrates all of the desired visual and shadow features. Otherwise, we’ll be here for a very long time.
I realize that now. I’m sorry.
I’ll get something up and running before showing it off here; this time, it’ll be done not as a mockup, but in the project itself.
I’m out of ideas. This is about the closest thing that could even remotely be considered a “mockup”, even if it’s from the project itself.
The shadows are part of the textures, so the parts that “cast” them cannot move; it would otherwise break the illusion. Moving parts also cannot “cast” shadows for the same reason.
That’s why I came here, to see if I could “cast” dual-layer shadows at runtime (with the top layer’s being slightly smaller than the bottom layer, to allow a unique texture through), rather than draw the shadows onto the textures themselves before importing the textures into the engine.

Slight deconstruction to show the shadows are part of the textures:


