Using multiple view hierachies on the same tilemap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By godotNewbie
:warning: Old Version Published before Godot 3 was released.

I am trying to make a 2D top-down view game. My problem is the following (I am trying my best to describe it): I am using a tilemap for my buildings and a kinematicbody for my player. I want to make my player show up when he passes in front of a building (by being above the tilemap in the z-sorting hierarchy) but hide when he walks along the ceiling, giving the impression of the back wall you cannot see. And so my question is how can I achieve mulitple view options for the same sprite/tilemap? Thanks!

:bust_in_silhouette: Reply From: YeOldeDM

If you enable Y Sort on your TileMap, map tiles and any children of the tilemap (make the player a child of the map) will draw in order of their Y positions.

Nice one, thanks! I would like your help in more matter if you could. Tiles from the same tilemap seem to have a hierarchy on their own, meaning that the most right tile is shown first. For example, If I place a house between two trees, the tree to the left will be seen behind the house, but the right one will be seen in front, which seems wrong. Is there any way to control this?

godotNewbie | 2017-07-16 22:15