Orthographic camera rendering order not always working

Hey if anybody could shed some light on this I’d be grateful…
Basically I’m determining the render order of all my on-screen gameobjects each frame by setting their vertices each frame - and setting the z value to determine which should be down in front of which… The objects are all flat planes with just 4 verts …
This all works fine most of the time - but in some places where I’m sure that the z verts are being correctly assigned, some objects which should be in front of others are being drawn under them… And I really can’t see why…
FYI - this is a conversion from an iPhone game so that’s why I’m doing it like this - in the original code the objects were rendered in the precise order they should be drAwn so each time I draw something I increase a global var that contains the z-depth for the next drawn object…
Camera is orthographic…
Any clues?
Thanks,
Ross

first. check this

second. check shaders. shaders also have a render queue value that is more important that z position. shader with lower queue value will render first.

third. for transparent objects they are sorted using it’s pivots. so be sure not vertices but pivots are sorted in right order

Thanks for your answers here -
The problem did seem to have something to do with using the transparent shader - when i turned it off - everything was rendered right -
the solution that finally worked for me was to set the ‘render queue’ value for each GameObject’s mesh renderer material - like so…

so each frame for each GO it’s …

meshRenderer.material.renderQueue = Globals.renderQueueCounter;
Globals.renderQueueCounter += 1;

basically…
thanks