Hi. I'm creating the player. With Unity 6000.0.26f1 , URP is default, so I added the script SetTransparencySortAxis to the main camera as suggested in the tutorial and set the Sprite Sort Point to Pivot.
But this does not seem to work. Player is overlapping the other objects, sometimes above them, sometimes behind.
Checking the demo 2D I extended the default nav mesh so Brain could walk behind the tree. Everything works as it should when Brain's Pivot is under the Tree's Pivot (Y axis) his sprite shows above and vice versa.
But the scene Main Camera does not have the SetTransparencySortAxis script attached and the Sprite Sort Point is Center. The Tree's order in Layer is 4 , Brain is 1, traditionally this should show Brain on top of the tree, always.
So i was wondering what should I do to make my scene behave like the demo?
Thanks.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The 2D Demo sorts correctly because it uses the "traditional" method of using its Sorting Map to affect the Sorting Order of characters based on their Y-position.
In URP, the Transparency Sort Axis is a field in your URP settings asset. Forego the script, and instead set the Transparency Sort Mode to Custom, Axis to 0,1,0 within your URP asset.
awesome, fixed now. Always appreciate your helpful insights Chris. Have a good day.