Search Issue Tracker

By Design

Votes

0

Found in

2017.4.0f1

2018.4.0f1

2018.4.7f1

2019.2.0a1

2019.3.0a1

2020.1.0a1

Issue ID

1185350

Regression

No

TileMap renderer does not consider the z value, therefore, sometimes does not achieve the desired effect

2D

-

How to reproduce:
1. Open attached project "Tilemap.zip" and scene "test1"
2. Enter Play mode
3. In Game view, press on "Generate Map" button
4. Observe the render order of buildings and trees

Expected result: rendering order of trees in front and behind the building looks good
Actual result: rendering order of trees in front and behind the building does not look good

Reproducible with: 2017.4.32f1(built-in), 2018.4.9f1(built-in), 2019.2.7f2(built-in), 2019.3.0b4(built-in), 2020.1.0a5(1.0.0)

  1. Resolution Note:

    The visual effect can be achieved by setting the pivot point of Sprite 44 (The House) to (0.5, 0.33) and positioning the house accordingly (one cell higher). This is shown in 11.png in the GameView and 12.png in the Sprite Editor.

    For a Tile that spans across a few cells, the sorting point is generally the midsection point of the base of the Tile. This makes sense for the house 44, as anything in front of the midsection point should be drawn after the house, while anything before that midsection point should be drawn before the Tile.

    For Tiles like the Trees, the Bottom pivot point is correct as you would expect anything below the base of the Tree to be drawn after the Tree, while anything above that would be behind the Tree trunk.

    Adjusting the correct pivot/sorting point of the Sprite is tricky and is greatly dependent on the art and size of the Tile.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.