Game Development Community

Z Depth" within a layer possible? (TGB)

by Steve Kim · in Torque Developer Network · 04/22/2007 (5:43 pm) · 2 replies

Hi,

Is it possible to control the ordering of sprites within a single layer? I'm trying to make a Double Dragon beatemup game, so the hero and thugs need to have their "z depth" constantly updated as they walk up and down the screen. In other words, the sprites that are closer to the screen need to cover up those that are further in the background. Any suggestions on how I can tackle this problem using a single layer?

#1
04/23/2007 (3:48 am)
Yes, have a look at the Layer Management options on your scenegraph.

You can set individual layers to sort by a Y position (sort point). Pick the layer you want to use sorting on and set the axis to "Y Axis". You can fine tune the sort point for individual sprites from the level editor options (couple of options to the right of set collision bounds)
#2
04/23/2007 (12:42 pm)
Fantastic. Thank you!