I've got the tilemap setup so that
x is to the right and
y is up. I have the map setup as a few different layers to help with z-order in relation to other tiles (base layer, overlay layer, objects layer, and an "always on-top" layer). As the player is moving up on the y axis, he should be moving behind tiles that are lower on the y-axis. There is also the issue with bridges: they are over the player even when the player's
y-value is less; unless the player is
on the bridge. The player is an animated (2-tile high) sprite with a collider on his feet, by the way.
I changed the tilemap code to allow a y-partition size of 1, just to see what I could get going. I also changed the z-"increase" per row from .000001 to something a bit more drastic so I could see the change. This gave me a bit more control, but obviously at a huge slowdown. I'm looking for a really clean way to do this and I know I'm really going in the wrong direction. I was thinking of adding a field into the tilemap settings inspector for "tile row z-change". In the code, regardless of what partition a tile is in I'll base that tile's z-position on it's row's y-position and change it by that inspector z-value (taking layer z into account also). I'm not sure if this will give the results I'm looking for, but it's just an idea.
I'm making a 2D SNES-like rpg and I'm trying to find an all-encompassing solution that will work in a variety of situations. For the most part, everything is perfect. There are just a few instances where the player needs to be behind something. I know this problem has been solved in the past hundreds of times. I'm just trying to find a clean solution in the context of 2D Toolkit. I really appreciate you consistent help on these forums...This has been money well-spent