Game Development Community

Z-Odering objects

by Gavin Beard · in Torque Game Builder · 01/13/2009 (10:30 am) · 3 replies

Hi all,

I have tried searching the forums but all results i find seem to be TGE posts.

I am hoping someone may be able to point me in the right direction for this as i'm hitting my head against a wall ;-)

What i have is a base tile map, a user controlled character walking around the tile map (controlled by arrow keys), and then objects placed around, such as tree's rocks, buildings etc (think Snes RPG / TBS).
The effect i'm needing to accomplish is that of the character going in front of / behind of objects based on his x/y position?

I'm sure this is simple and i'm just missing something simple, but any info would be great.

thanks

#1
01/15/2009 (12:17 pm)
Gavin,

I never played SNES RPG so I may be off base, but it sounds like the higher something is on the screen the more it should be placed behind objects in the foreground. Have you looked into using the Layer Management tab and selecting ordering by axis? I've only played with it a bit myself, but based on the sort point of an object you can get another object to appear ahead or behind it based on either X or Y position. (btw, I had a hard time finding the tab until I clicked on t2dSceneGraph in the project tree, then Edit).
#2
01/15/2009 (12:22 pm)
Ah...i shall have a look at this Aaron, This may well be what I need. Many thanks, i'll update the post if it works.
#3
01/17/2009 (7:25 am)
Had a play with this and indeed the sort by Axis seems to work for the most part, many thanks