TiledMap use layer as floors?

It would be possible to use the layer of the map as floors so that the player can walk in both, as in a bridge where player1 goes under and player2 goes over?

The simplest solution is to have some sort of trigger on the tile near the bridges which you have outlined with arrows. When the player triggers that event move the player to an appropriate depth layer. This of course requires the bridge and the landscape to be on separate tile layers.

1 Like

Alternately, couldn’t you just store the player’s depth as part of the player state? They either are on layer 1 or layer 2 or whatever. Of course, then you still probably need some sort of trigger when the player walks up a hill so yeah.

As for exactly how to do it, we did have a very lengthy discussion about the technical details a while back. To be honest I can’t remember the solution off the top of my head but I’m pretty sure we came up with something that works.

It probably needs to be revisited at some point. Even if it’s just to make a better demo / documentation.