- Edited
Hey, frustrating problem here:So I've got a y sort node and parented to that node is a tile map (with y sort enabled) and the player (a kinematic body with sprites as children) but it wont y sort at all. YSort |Tilemap |Player(kinematic2D) |Sprite1 |Sprite2 |AnimationWhen I make my player a child of the tile map with Y sort enabled it half works. But the sprite animations have changes in Z values, so various parts of the character pop through. So, once again, Y sort doesn't work. YSort |Tilemap |Player(kinematic2D) |Sprite1 |Sprite2 |AnimationThe problem is I'm dynamically loading in different areas, and each area can any number of object tile maps, plus an unknown amount of NPC's, all of which needs Y sorting. I want to be able to dump everything in a Y sort node so that I don't have to keep adding everything as a child of the last tile map and then re-jigging the tree every time I remove a tile map. YSort |Tilemap1 |Tilemap2 |Tilemap3 ... and so on |NPC1 |NPC2 |NPC3 |PlayerAnd even if I did do that, Y sort doesn't work with animations that change the Z index anyway. I aware that Y sort doesn't sort children of a Y sorted object, but then why does it mostly work (bar animations) with player (which consists of multiple children) as a child of a tile map with Y sorted enabled? Also, if it doesn't work with children, then all the parts my NPCs would have to have to exist as separate children of the Y sort node, which would break the encapsulation they have. YSort |Tilemap1 |Tilemap2 |Tilemap3 |NPC1_head |NPC2_body |NPC1_legs |NPC1_weapon |NPC2_head |NPC2_body |NPC2_legs |NPC2_weapon ... and so on .... |Player_head |Player_body |Player_legs |Player_weaponThen because I can no longer put each NPC and player in their own top level node, it becomes harder to spawn them into the level dynamically. So which ever way you look at it, the Y sort node doesn't work.Any ideas?