Hello!
I'm trying to understand how to set up my draw ordering properly. I have a tile map with a bunch of textured quads as trees/rocks etc. on top and real meshes(not flat like the quads) for players and other entities. It currently looks like this attached image. I'm trying to figure out how to:
- Properly sort the textured quads (this can be done by setting the Z of the transform since they're flat, only 1.0 Z). i.e. the rock is behind the tree.
- Have meshes stacked without z-fighting glitches. (This seems to work)
- Properly render the entity meshes in front/behind of trees/rocks. (This does not work currently).
Number 3 is what I'm very much struggling with. For example, if I set the Z to the Y value, it works well for the quads but an entity cannot fit in between for example Z = 50 and 51 since it isn't flat.
Is there any techniques to solve this problem? I don't know the terminology of 3D rendering enough to even understand what to search for to find possible solutions.
I can make the code available that was used to render the image if needed.
Thank you so much in advance!