I’m programmatically adding buildings at the horizon and they all have the same sort order. but sometimes a building will appear in front of each other. I am scaling them and sliding them slightly left as they come closer.
Should I be looping through a sort order each time I create a far away building or is there a better way.
I’m using 2d characters for the sprites.
What is the best approach to keep the side building scroll like 3d, since eventually I will run out of building sort orders at 32k. Or should I use a z-index?
you can transpose the items Y position value to it’s layer sort index. (common technique in isometric or topdown games, if you want to look up reference code)