- Home /
Question by
bholyomes · Mar 18, 2016 at 12:39 PM ·
2disometricsorting order
How to sort sprites in a 2d isometric game
I'm making a 2d isometric game and I'm running into a problem with sorting sprites. For all my objects in the scene i set their z position equal to their y position and then on any characters that can move around i make their z position always equal to their y via update so they are correctly positioned in front of or behind objects. This works fine if the object a character is moving around has a flat base (i.e. a line along the y axis), however in isometric most things have a diagonal base and this method does not work.
An illustration of the problem can be seen here in this similar question: http://answers.unity3d.com/questions/1136534/how-to-calculate-sorting-order-around-diagonal-obj.html
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612072223im_/https://answers.unity.com/themes/thub/images/avi.jpg)