Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualDJTN

Posted 06 June 2012 - 04:55 AM

Can you attach an image of the problem?

The z-order is determined by the order in which you render the sprites. The first one will be on the bottom and the next one would be on top of that, so on and so on. If you need the order to be dynamic you'll need to programically assign a draw order yourself with a list or some type of collection associated with your sprites. Normally you'd sort them so solid sprites are first and then transparent- layering them the way you want.

To recap:

Create a list of sprites.

Sort your objects from farthest to nearest.

Sort the objects from solid to transparent.

Render lists.

#1DJTN

Posted 06 June 2012 - 04:49 AM

Can you attach an image of the problem?

The z-order is determined by the order in which you render the sprites. The first one will be on the bottom and the next one would be on top of that, so on and so on. If you need the order to be dynamic you'll need to programically assign a draw order yourself with a list or some type of collection associated wiht your sprites. Normally you'd sort them so solid sprites are first and then transparent- layering them the way you want.

To recap:

Create a list of sprites.

Sort your objects from farthest to nearest.

Sort the objects from solid to transparent.

Render lists.

PARTNERS