I have a tile map serving as a map for my game. Then I have a sprite for the player. The issue is the sprite keeps rendering below the map. I’ve gone over the render pipe line page and played with the render module and script and messed with predicates but I have no clue what I’m doing so I’m doing something wrong.
They are sorted by Z position. You just need your sprite to have a higher Z position than your tilemap. Make sure you check the Z positions of the game objects they are attached to. (they add up)
The default render script draws things that are between -1 and +1 in Z. You can use very precise values within that range, like 0.001 and 0.002.
The Z values of the layers inside your tilemap only matter for sorting the tilemap layers though. The whole map will still be drawn in one pass. So if you want tiles that draw below the player and tiles that draw above the player you will need two separate tilemaps.
1 Like
Thank you that fixed it.
1 Like
You can read about this in the graphics manual in the z-order section:
3 Likes