Y sorting nested nodes

Godot Version

Godot 4

Question

I have a node hierarchy like this:
image
I need the AnimatedSprite2D in the player to be y sorted in front and behind the WallGraphic1. I have tried enabling y sort on them both and their parent nodes and the world node, but this still does not y sort them. Is it that they cannot y sort because they are on different branches of the node tree?

EDIT:
I have now tried without the tileset layer y sort enabled and it y sorts from the center of the tilemap, but i need it to sort based on the tilesorting of each tile

on the Game node, also turn on the Y sort enabled

I have tried this, but it does not seem to have made any difference, do you have any other ideas?

did you also enabled the y sort for the Player and Walls Node2D?

1 Like

Yes, and also I adjusted the y sort origin to correct it. Works perfectly now.

1 Like

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