Can't make nested y-sort work on Godot 4.2.2

Godot Version

4.2.2

Hello! I’m trying to y-sort the nodes “Fruit” and “Fruit2” but for some reason they don’t unless they’re siblings / children of the same parent node. I’ve done some research and as far as I know this should work but for some reason it doesn’t, please if someone could let me know what I’m doing wrong or if this is straight up impossible to do

  • Snake Node2D has y-sort Enabled
  • Segments Node2D has y-sort Enabled
  • Consumables Node2D has y-sort Enabled

The fruit nodes don’t have y-sorting enabled, I also have tried enabling y-sort on them but neither does it work, I’ve also tried only enabling the y-sort on the Snake node but same result

image

As I said, the only case y-sorting works is like this, but this doesn’t work with what I’m trying to achieve:

image

Is this the expected behavior? If so, is there a way I can make it work having the nodes as I showed on the first picture?

Thanks a lot for your time and help!

i believe y-sort should work as you expected. May i ask how your “Fruit”-scene is build up?

1 Like

Thanks for taking the time to answer!

Turns out in order for the y-sort to work as I wanted I had to turn off “Z as relative” property for both the fruit scenes, after that everything worked as expected!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.