TileMap Layers transparency when Player behind

Godot Version

Godot 4.5

Hello! I am developing a Top Down Pixel Art rpg and want make the trees(and buildings) transparent when the Player is behind them. Is there a way to do it using Map Layers? or you need to have those objects in different nodes using “transparent” areas2D? The only tutorial in Youtube I saw for this is from Godot 3.5, but he doesn’t explain it in detail.

func _ready() -> void:
    print("hello world")

I think you’d need to have the tree tiles be scenes with the script attached that makes them transparent, and put them in a scene collection in the TileMapLayer.

Thank you. I didnt know about that option in Tile Maps.

1 Like