I wonder how can I set the depth of the layers in a Tiled map.
A simple example, a map with two layers: background and foreground, and I want my sprites to be above background but below foreground. Is it possible, or I should use multiple TCastleTIledMap, one per layer, as a workaround?
If you want to position your own scenes (like TCastleScene) between 2 layers of a Tiled map, then indeed the solution we recommend now is to create 2 TCastleTiledMap instances, with the same URL (pointing to same Tiled map), and use there different layers subset. This way you control explicitly the depth of everything (set the Z of the foreground/background maps as far as necessary).
1 Like