I am having a problem with Y-sorting in an isometric Godot game. More specifically, when my character moves behind/in front of larger objects than one standard tile size, the rendering is inconsistent. One side usually works as expected, while the other is all messed up.

I have drawn two illustrations for two variations of the same problem to better illustrate my point. One is using a polygon for a collider, and the other is using a segment:

enter image description here

enter image description here

I have asked this question on Reddit, and while the guys over there were extremely kind; they suggested to just slice up my object so they are not larger than one tile size. I find this solution quite challenging. It may work for simple objects like walls, but the ones in question for me are fully interactive with 8+ animations. Slicing them up into 2 or 3 slices would be tremendous work. Not to mention it is wholly inefficient. Imagine your game having 100 of these large objects (like mine); slicing them all up seems more like a hack than a solution.

Now, interestingly, Lost Game Dev over on YouTube was having the exact same problem as me and was able to solve it by adding pivot "lines" instead of points:

YouTube video of Dev solving isometric sorting issues

Now, he's using Unity (I think...), but still. He's solution is elegant, and simple. Is a similar solution possible in Godot? Or any other that would prevent me to hack my otherwise singular objects into pieces?

I am using Godot 4.2 and the mobile rendering engine. All nodes are on the illustration.

  • \$\begingroup\$ 1. This is an issue with large objects (in particular dialgonal objects, which of course is how you will setup objects in isometric games), but not necesarily in isometric games. 2. Slicing might not be enough once we consider verticality, but you might not need that. 3. That simple and elegant solution is not simple and I'm not sure how elegant... But it just easy to use! The author had to implement it, but didn't go into details. See also youtube.com/watch?v=yRZlVrinw9I 4. Yes, that should be possible in Godot. However, I don't have the time to work it out right now. \$\endgroup\$
    – Theraot
    Jan 28 at 2:33
  • \$\begingroup\$ You're absolutely right, this is the thing I am looking for. But, I was hoping for a "built in"solution. This would a tremendous amount of work to implement into Godot; not worth the effort at the moment. So, I guess it is slicing... \$\endgroup\$ Jan 28 at 8:51


You must log in to answer this question.

Browse other questions tagged .