Closed willwull closed 8 years ago
Is there a way to set depth order of a draw call? Or do we have to arrange the draw calls ourselves?
This is something we handle in the draw function for each game object. We use the spritebatch.draw function to draw different layer dephts: https://msdn.microsoft.com/en-us/library/ff433989.aspx
With the ratio it says: a float from 1-0 where 1 is the bottom layer and 0 is the front layer. All we have to do is to divide the y position with the screen height to get a value from 0-1.
Is that ok with everyone? @xobust @willwull
Yes that sounds good to me :ok_hand:
Ez katka
Can we close this now or is there more to fix?
Yeah ofc we can close it :+1:
Currently, all sprites are drawn on top of each other depending on the order in which the sprites are drawn. However in the final game, objects that are lower on the screen should be "above", or in front of, objects that are higher on the screen.