I’m trying to prototype a simple 2.5D scene and I draw it using Quads and spritesheets How to make spritesheet for JMonkey
I also set up camera for orthographic mode just like what Momoko_Fan is suggesting in his answer to How do I make my camera go in ortho mode? - #8 by Addez
I’d like to somehow be able to draw two textures on top of each other, e.g. one could be an npc sprite, the other is a helm that npc is wearing and the other is a sword npc is holding. Let’s assume that there could be a ton of sprites for npc, helms and swords so producing a singular texture for all combinations of these is impractical. One suggestion I saw on this forum was to use TextureAtlas and my concern is that it’d consume too many resources if I end up using this in a situation when there are a lot of texture combinations.
It seems that the easiest way to do this is to use multiple quads and lay them on top of each other using z coordinate increments to implement z-order.
I just wanted to confirm that it is indeed a way to go and no simpler or more optimal approach exists.
It seems a bit “hacky” to me that I need to increment z-coordinate as it may create an unintended effect of slight scaling of a topmost texture - albeit it seems that I shouldn’t worry too much about it as long as z coordinate increments are sufficiently small, e.g. 0.00001 or the like.