Game Development Community

Zorder problem

by Alienforce · in Torque Game Engine · 09/14/2006 (10:51 am) · 2 replies

I have a backdrop treeline using a cylinder with flipped normals and textured with a alpha masked treeline image. My problem is that ex. Hiding/looking from behind any foliage with alpha masked textures the "treeline" is drawn in front of the foliage.

Any idea how to solve this ?

#1
09/14/2006 (11:09 am)
Well, DTS shapes are sorted by depth - based on the center point of that shape, by default.

I'd recommend making a custom shape that submits the treeline in the same part of the ordering as the sky - look at how the skybox sets itself up to render in prepRenderImage - so that it gets drawn after everything, and before the sky.
#2
09/14/2006 (11:35 am)
Thanks Ben, I will look into to it right away :)