Game Development Community

Sort Points

by Jason Ravencroft · in Torque Game Builder · 09/15/2007 (5:34 am) · 2 replies

Can somebody offer advice on sort points? I have a simple test where my character stands behind a fence and when he's higher up on the screen he should be behind the fence, when he's lower he should be in front of the fence according to the level editor. When I get in the actual game, he's always in front of the fence.

I saw them discuss something like this in the Adventure Kit, but I don't have it. Is there something I need to set in my 2DScenegraph? Help would be great, I was up until 2:30AM working on this and I'm back at it just six hours later. :(

Addendum:
They were in different levels from other scripts. How embarrassing to not catch that. :(

#1
09/15/2007 (7:59 pm)
Mr. 2:30 AM will do that to ya... He gets me everytime.
#2
09/17/2007 (10:22 am)
All those objects should be in the same layer, then set the layer sort mode to +Y or -Y. You can find this if you go to the edit tab while having no objects selected. You may not need to use sort points at all depending on the perspective of your sprites. But if you do, the sort point should be on their feet / where the object is touching the ground, because thats the point that should be compared to other objects to determine which is in front.