Hello, I’m having problems with rendering objects in the correct order according to depth. Right now I have a script that will instantiate “Card” objects, which are simple Quad meshes with a texture. The script calculates their position and Z-axis rotation to arrange them in a “card hand” pattern.
What’s giving me problems is having the cards render in the correct order, in which the right-most card is at the back, and the left-most card is at the front. I tried to do this by making each card be 1 unity apart on the Z axis. However, this gives me the following result:
Only when I distance the cards by steps of 20 units in depth do I get the desired effect:
I was wondering why is it that separating the cards on steps of 1 unit in depth doesn’t create the same effect on rendering order. The problem with separating them by 20 units is that the sizes of the two edge cards are too different. It also creates this “spiral” type of pattern, rather than a clean circular pattern. Is there any other solution for this?