BBloggsbott
BBloggsbott

Reputation: 388

How do I place multiple times in the same place to handle corners in godot 4?

I have an "L" shaped corner in my level. I have tiles with the wall detail and the floor detail. In the corner of the "L" I am able to place only one tile. So I can have either a wall tile or a floor tile. I want to have both in the place.

One solution I found was to use two TileMaps with the same tileset to place two tiles in the same position. But it felt like there has to be a better way to do this rather than create a new node just to handle corners.

Upvotes: 1

Views: 386

Answers (1)

Theraot
Theraot

Reputation: 40315

In Godot 4 you can add multiple layers in your TileMap. In the inspector you should find the list of layers and an option "Add Element" to add a new one:

Add layer

You could, for example make a layer for the floor, and another for the walls, and so on.

Once you have created your layers, you can then choose which layer you want to edit in the TileMap panel.

This way you can have multiple tiles in the same position (but in different layers) without creating a new TileMap.

Upvotes: 1

Related Questions