tree shadows under player

S

Stancho

Guest
hello.
So. i'm using depth = -y to make the effect of going behind trees.
My tree is:
draw_spire(shadow)
draw_self()
so the shadow is under the tree.
But when my hero goes behind the tree (depth = -y goes into effect), the tree shadow shows on top of the hero. when the hero is in front of the tree, the tree shadow is under the hero as it was meant to be.
Is there a way to make the tree shadow always under the player without making 2 different objects for the tree and the shadow?
Thank you!
 
S

Stancho

Guest
one problem tho... the draw begin draws under the tiles of the room.
 
Last edited by a moderator:

Bearman_18

Member
Depth = -y is tricky to make work the way you want it to, despite how smart it is. Personally, I would just keep the shadow a separate object and put it in a group with its corresponding object and just not think about it. Multiple objects suck, but when I dabble in other methods, it usually sucks worse. Instead of making the tree shadow under the player, I would just make it semi transparent, and always on top. Sorry this isn't helpful. But it's just a thought.
 
Top