"Split" a Sprite / Layer

Hey Guys, not sure how to descripe it really lol…the screenshot shows best I think!

I have multiple player characters (for 2 players) that move around on the grid. But as you can see, the head of one of them is under the feet of the other one. I can’t just solve it with layers as 1) players can spawn new characters and b) it would not work because well they can move freely so…

Is there an option to like “split” the Sprite in 2 and make the top one always be on top of the lower one and eh I dont know. Hope it’s clear what I need :smile:

Cheers!

6756787--779773--overund.PNG

People often solve this issue by adjusting the way 2D Sorting works, https://docs.unity3d.com/Manual/2DSorting.html For example, you might consider a Custom Transparency Sort axis that is (0, 1, 0), meaning you use the y-position to sort objects with the same order / same layer transparency. If using standard, you can find this setting in Project Settings > Graphics, whereas if using the experimental 2D Renderer it’s on the renderer’s asset.

Sorting Groups are also a useful feature to be aware of, especially if your characters are composed of multiple sprites which should all sort around a common point Unity - Manual: Sorting Groups

1 Like

Thanks! That actually was much easier then I originally thought it will be :slight_smile: