Search Unity

Isometric Tilemap Z as Y Jumping and Sorting

Discussion in '2D' started by TRRBusiness, Aug 7, 2019.

  1. TRRBusiness

    TRRBusiness

    Joined:
    Aug 7, 2019
    Posts:
    6
    I'm working on a Isometric Z as Y test project similar to Solstice (NES) or Landstalker (Genesis). Four direction ISO movement, pixel perfect. Collisions are a kinematic rigidbody, floor height is simulated, etc. All of the movement stuff is alright, I can walk/jump around but I'm having quite the time figuring out if the Unity Tilemap sorting will ultimately work for me. Version is 2019.1.13f1.

    I'm playing with 2 transparency axis's, mostly -0.49, and also -0.26.

    The tiles are 32x24, the facing sides being 8px tall. I need the character to walk behind at 8px which gives us a pivot of 0.5f, 0.25f. The sprites pivots are at the bottom. Currently I'm having to splice it into multiple 8px pieces so they can sort independently.

    I set the Z value of the sprite to 1f for every 0.25f of "floor height". So if the current floor is 0.5f (2 tiles) high, we would start at a Z of 2f. Jump height is converted as (jump * 4f).


    So, on to my issues. Basically walking around at -0.49 axis looks great. You can jump to higher floors and it sorts reasonably well against any nearby tiles. It does get a bit iffy if you approach the side/pivot height, but it's tolerable since collisions mostly keep you far enough away from edges to not see too much of it, and I may be able to adjust this slightly. However, the logic completely breaks down during jumping. You'll see tile pieces incorrectly sorting, and any attempt to adjust one way or the other just leads to either front/back problems getting better/worse.

    Jumping is pretty much perfect at the -0.26f axis, but the current floor shows through my feet at the top of the tiles and I can't really adjust the Z height because the sorting with other tiles breaks.


    Am I wasting my time? I've spent countless hours searching forums looking at all the setup guides, moving every pivot, trying every combo of tile sizes/shapes. I think I'm stuck and it possibly just wont work for what I want to do with it.

    Thanks, RR


    bigimagenotes.png See attached for setup/notes.
     
    Last edited: Aug 8, 2019