Hi im working on a simple pixel game with a tilemap. Here is an Image of it. As you can see the player stands behind this wall. I solved this by using two tilemaps with different sorting layers. Now i want the player also to walk in front of the wall. Has anyone an example how to do somthing like this or maybe an idea?
Maybe for all of the tiles that have height (the player could walk behind them) make a script that has an if else if(Player.transform.position > transform.position) { //Sortinglayer for covering player } else { //Sortinglayer for not covering player }
Nice idea but as far as i know you can't change the sortinglayer of a single tile. But only for the complete tilemap. Or are I wrong?
I don't know, I have never used tilemaps. You may want to consider trying to make a custom tilemap-like loader with sprites instead.