I am currently working on an Isometric game. I want the character to be “in front” of any objects when the bottom center pivot is below the object. When that pivot point is on top of the object I want them to disappear “behind it”. No matter what I seem to do and no matter where I set the pivot point or what I set the transparency sort axis at I run into the problem of either
A: There is a part of the sprite where the character suddenly appears in front again
B: The character starts disappearing even when the pivot point at bottom center is below the sprite
*Also I will need to be able to rotate the sprites in different directions and have it still work
Thank you for any help you can offer, I am lost here
Did you follow the pages about isometric tile sorting?
There are greater constraints on art and art design with isometric games. For this reason, they should be considered more difficult than traditional 2D and 3D games due to sorting problems and the constraints this imposes.
Sorting points should be put at the “base of the object”. Imagine an isometric tree. The sorting point should be the base of the trunk. The character then needs its sorting point at its feet. I don’t think you can both fit this requirement and also allow arbitrary rotation.
You might need a parent gameobject with a Sorting Group. This component lets you arbitrarily place a sorting point, no matter what its child gameobjects are doing. This is often required for characters composed of multiple sprites.
Beyond that, so long as you’re doing everything “right” according to the above link from @CodeSmile then the next things to ask yourself:
- Can you use colliders to block bad sorting?
- Can you change art sizing to block bad sorting?
- Can you cut up art into multiple sub-sprites to have more precise sorting points?