Changed sprite pivot point to custom , but it doesn't work well at sorting . #5.6
Hi , I meet a issue. I modified two different sprites (lamp and mam ) pivot to their bottom ,and they are root game object in scene currently. If I selected the sprites using Pivot mode , I can see picture 1 But it doesn't work on sorting. I set the same Sorting Layer and Order in Layer for them and changed Transparency Sort Axis to 'Custom ', changed Y to ‘1’, Z to '0'. But the lamp sprite didn't cover the man sprite , actually the player'Y is bigger than lamp's Y ( You can see Picture 2)
, Why not the Man covered by Lamp ? Could any one can tell me why ,
Answer by DBruington · Jan 25, 2018 at 12:29 AM
The official response to this was "Currently it uses the center of the sprite, not the pivot point. So it won't matter where your pivot points are. We are adding that functionality to use the pivot point. Coming soon. :)"
Answer by MJonee · Feb 02, 2019 at 06:17 PM
You can achieve this adding using a sorting group. Add the sprite to a gameObject and add a SortingGroup component to the gameObject. Then the y coordinate used for sorting will be the one of the parent. (No need to change the pivot of the sprite)
Your answer
![](https://koobas.hobune.stream/wayback/20220612125638im_/https://answers.unity.com/themes/thub/images/avi.jpg)