When creating an isometric tilemap-based game using Cocos2d 2.x, automatic Z-ordering was not a problem.
We can just read the vertexZ/zOrder value of the tiles (treaded as CCSprites
) of every layer and update our nodes accordingly.
Now I use v3.3 of Cocos2d.
CCTMXTiledMaps
have been replaced with CCTiledMaps
CCTMXLayers
are replaced with CCTiledMapLayers
In versions 3.0+ we cannot treat individual tiles as CCSprite
's and hence the tiles themselves has no zOrder or vertexZ property.
This makes it impossible to know what zOrder i should update my moving characters to in order for them to be rendered realistically.
Is it possible to do automatic zOrdering in some way using tiled maps and moving objects? How is it supposed to be done using cocos2d v3+?