I’m making a character template and I wanted to put clothes on them, doing it in separate layers for each piece of clothing, but I need to place part of the shirt sleeve in front of the arm, so I used the Z-index, but negative to go behind. The problem is that the Z-index doesn’t work the same way in Engines where they are all 0 and if you set it to -1 it goes behind all others, so if I add a new layer it messes up the entire Z-index. Furthermore, I discovered that hiding any layer also messes everything up.
Hi @skullbrow, the actual z-index solution is an index relative to the layer position.
The issue hiding layers looks like a bug to be fixed (I’ll create an issue related to this), the index should be relative to the layer position counting even hidden layers.
As you said other possibility would be to offer an absolute z-index, where everything is 0 by default and painted in order, and if something goes -1 goes to the background, and +1 goes at the front. I think with that option might be difficult to bring just one layer in one specific frame only, as it will require to set the z-index of all other layers too (e.g. if we want to put one layer above another, but all other layers should stay in the same position in front of everything else).
Hello,@decap, thank you for answer. I don’t know if I understand well but I think the engines works well with that. In Godot I can use nodes like layers and z-index if necessary.
My biggest problem is making clothes/skins for the characters. I divide the template and the clothing into groups based on angles, but I need to separate the head, arms, and body. Since I need to make a shirt, I need to separate the shirt sleeves. All of this needs to be on top of the arm layer, but the part of the shirt without the sleeve needs to be below the arm. If I do this via layers, it becomes confusing because the sleeve layer is up there and the body layer is down there. It gets even worse when there are many clothes.
Using z-index would solve it, even if it didn’t have a layer-hiding bug, it’s still quite bad because when I create a new layer, it messes up the entire z-index. Imagine I have 3 folders for North, East, and South angles, if I create a new outfit, I need to put it in all 3 folders, and each layer will receive a new layer, creating a complete mess.