Hi everyone,
I'm currently working with a Tilemap node that has multiple layers in Godot 4.2. Specifically, I have two layers:
- Layer 1: Ground tiles with collision enabled.
- Layer 2: Decorative or interactive tiles that sometimes overlap Layer 1.
I'm trying to achieve the following:
- Layer Prioritization: I want to enable or disable Layer 2 dynamically. When enabled, Layer 2 should visually and functionally override the corresponding tiles in Layer 1.
- Collision Handling: If a tile in Layer 2 overlaps a tile in Layer 1 and does not have collision, I want the player to be able to walk on this tile as if the collision on the tile from Layer 1 does not exist. However, by default, the collision from the underlying tile on Layer 1 is still being considered.
Is there a way to prioritize Layer 2 over Layer 1 in such a way that the collision behavior also respects this priority? Any guidance on how to implement this would be greatly appreciated!
Thanks in advance!