In the attached picture, I’ve got the Right Arm bone chain parented by Upper Back. Upper Back and Lower Back are set to depths 11 and 10, and the Right Arm chain is 50/51/52. Shouldn’t right arm then be appearing in front?
Right Arm is its own sprite, and the torso is its own sprite.
I was able to solve this by changing the layer order in the PSB file (via the scene object → Model → Open), then refresh. I will file a bug that bone depth does not working when using the PSD importer.
Hey @BionicWombatGames yes that’s the correct way to change the layer order of Sprites in a PSB file.
The bone depth values on the other hand, affect only triangles in a single Sprite mesh i.e. the Depth only influences the same Sprite Mesh, for example, your entire arm L.
Rendering order of Sprites like you found out is still controlled by the Sorting Layer and Order in Layer option on the Sprite Renderer.
Take for example, in the Dragon Crashers - 2D Sample Project, the Primary character has a single Sprite arm L which is being weighted/influenced by 3 different bones, arm_l (pink), forearm_l (red) and hand_l (green).
If I change the Depth of bone forearm_l to be -5 while keeping the rest at 0, the forearm will rendered below/behind the same Mesh. It would not reorder the arm L mesh below/behind the torso which is a different Sprite.
Likewise. if I change the Depth of bone forearm_l to be 5 while keeping the rest at 0, the forearm will rendered above/in-front the same arm L Mesh.
Hope this clarifies!
1 Like