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
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [GameActivity] Exception "Didn't find class "com.unity3d.player.ReflectionHelper" and application crash when setting
- List view “Add” and “Remove” buttons in are misaligned when minimizing Graph Inspector
- URP/Lit and URP/Simple Lit and shaders based on these do not render in WebGL Player
- VideoPlayer freezes for a short duration after 1 second when streaming on WebGL from StreamingAssets
- VideoPlayer freezes or stops on certain Android devices when enabling and disabling the Video multiple times
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.