Collision for background and foreground in TileMaps

Godot Version

4.2.1

Question

Hi, in my 2D game, I’m trying to use a TileMap to build levels fast and I would like to paint in 2 different layers: background and foreground. The background shouldn’t collide with anything, but it seems I can’t link physics layers to TileMap’s layers. In few words, every tile should have collision if in foreground layer and no collision in background layer. What is the best way to handle this?

For godot 4.3: The tilemaplayer-node has a property called collision_enabled. This would be the easiest way

For godot 4.2: I think you need duplicate the tiles-atlas with different collision-layer/no collision at all

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.