Difference between verterxZ and local z of a node/sprite?

Hi… i am making a isometric map and i need to know what is the difference between vertexZ and local z of a node/sprite for there will be object running around my map and they will overlap some tiles… i am able to make it work by using the objects x and y coord. But still, im am curious to other approach which is depth testing… i modify the vertexZ of my tile and it somehow make the tile zoom in or it look likes the tile is closer to the camera. What is the behavior of vertexZ? and how do vertexZ and local z affect each other?

vertexZ is the z-coordinate in a x,y,z coordinate system. It’s indeed the distance to the camera. If you want a example how to use vertexZ, look at the tilemap tests. For making vertexZ to work you need to set a 2d projection and enable the depth test. That way the zooming effect will go away.

The local z-order defines the drawing order of nodes. A bigger number means that a node will be drawn later so on top of a node with a lower z-order.

VertexZ will override the local z-order (it works globally), so once you start using it, you’ll need to define it on every object.