Search Unity

Tile Map Suggestion: tile sorting that encompasses multiple tiles

Discussion in '2D Experimental Preview' started by AssembledVS, Mar 24, 2017.

  1. AssembledVS

    AssembledVS

    Joined:
    Feb 23, 2014
    Posts:
    248
    As of the current Experimental Preview Build 3, the tile map tile sorting feature only seems to work as expected with "objects" that are one tile long in the y direction, not groups of tiles that are used to create larger "objects" in a scene. For example:

    https://imgur.com/a/MzwOR

    The tree is composed of multiple tiles using the tile map and its renderer is set to "individual." Each of the tree's tiles is sorted individually, breaking the illusion of the tree being a cohesive object that you can go "behind."

    One solution: the tile map should allow us to select a group of tiles and set the y sorting to depend on the bottom-most selected tile's y threshold instead of every individual tile's y threshold.

    As it stands, I see three possible workarounds for tile "objects" that are taller than one tile and must be sorted, none of which are ideal:

    Does the Unity team have an opinion on this?

    EDIT 5/17/2017: Updated the GIF example and added more possible solutions.
     
    Last edited: May 17, 2017
  2. AssembledVS

    AssembledVS

    Joined:
    Feb 23, 2014
    Posts:
    248
    Is this something that the 2D team is currently looking at?
     
  3. AssembledVS

    AssembledVS

    Joined:
    Feb 23, 2014
    Posts:
    248
    I just looked at Preview 4 and the tile sorting is still the same. Now, this is not a bug, but I'm wondering what the Unity team thinks about this.

    Is this seen as an issue? Should we simply be working with multiple tilemaps that have "tops" and "bottoms" (for example, the top of a tree is always in front of the player while the bottoms of trees are always behind the player)?
     
    Last edited: May 17, 2017
  4. AssembledVS

    AssembledVS

    Joined:
    Feb 23, 2014
    Posts:
    248
    Last edited: May 17, 2017
  5. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    @AssembledVS You have highlighted the issue quite well. It is something we've been discussing and looking at various solutions - workflows to this. Trying to land on something that works well generally. Will update as soon as we have something.
     
    AssembledVS likes this.
  6. AssembledVS

    AssembledVS

    Joined:
    Feb 23, 2014
    Posts:
    248
    Thanks for the update and for working on this issue. This issue as well as 2D sorting always relying on the sprite's center are two things that are holding up workflows for top-down games a bit (there are always workarounds, though). And you said that you're also looking at 2D sorting, which is good to know. Tilemap sorting and 2D sorting should also work in tandem for a full solution to this.
     
  7. AssembledVS

    AssembledVS

    Joined:
    Feb 23, 2014
    Posts:
    248
    @Johaness_Reuben Do you have an update on this? What kinds of solutions are you pursuing? Do you have a timeframe? Right now, I am making multiple tilemaps of different size tiles to work around this (very common objects that are 2 tiles high get tilemap x, 3 tiles high get tilemap y, etc.), and all others are gameobjects with pivot-based sorting that @CarterG81 explained here.
     
  8. treecki

    treecki

    Joined:
    Feb 6, 2017
    Posts:
    23
    @Johaness_Reuben I am also wondering if you have an update on the individual sort order and a timeline. I am trying to make Indoor levels for a 2.5D game and I would like the custom sort axis for the level brush walls/ceiling (I made a custom one so they are 3 tiles high). Also the custom sort axis would save processing with doing that for my player and for future objects that are multiple tiles high.
     
unityunity