Hi everyone,
I've a confusing situation, regarding using pivots to do the depth sorting (which is a great new feature) - but in this instance I've a few issues, I think caused by my very specific use case.
If I've understood correctly, I can now leave all items on layer 0, and their individual pivot points are used, to compare to the main charactres pivot point (on his feet) to be correctly sorted, based on screen Y height (I followed the tutorial to set this up)
The problem I have is illustrated in the attached image.
https://drive.google.com/file/d/1rree1BUwNLJAkyW1HxuE7WhA5JBssWAI/view?usp=sharing
I've thought about multiple solutions to this, including exporting a much taller mug sprite, to encompass the full height of the desk then set the mug pivot to the same place the desk pivot is (the blue line on the carpet) so they can all exist on the same layer, and have the character correctly walk in-front and behind the mug and desk, but this seems convoluted?
Is there something I'm missing, some other simpler way to have an object be infront of another object at a higher height but be treated as if it's on the desk when the character walks around it?
Hope this makes sense, and thanks in Advance for any ideas.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
https://drive.google.com/file/d/1rree1BUwNLJAkyW1HxuE7WhA5JBssWAI/view?usp=sharing
The solution here is to use a Sorting Group, which allows you to build a hierarchy of sprites that can be sorted relative to one another individually, while treated as a single sprite when sorted with sprites outside of that group.
Essentially: attach a Sorting Group to the table, and parent the mug to it. Set the mug's Order In Layer to 1, and it'll appear in front of the table.