So player character is drawn behind the tree? There are 2 ways i can think of:

1) Treat player character and game objects same way and draw them Y-sorted.

2) Cut tree image in pieces where lower part of tree that player collides to is drawn in terrain layer and higher tree part is drawn in upper layer after terrain and player.