What about if we want the blue sprite to cast shadows, be visible when in direct light, but when goes behind on other shadow casting object be covered from it's shadow..? The only solution I found so far is to use the line of sight behavior on the light to detect if it's visible from the light point of view, thus not shadowed from an other object=move it up in Z order, and when it's not visible from the light's point of view = push it behind the shadows. I find this solution not very effective or visually elegant.
Any suggestions?