Exploring the TileSet physics
In this recipe, we are going to create an alternative tile and add a collision layer to the tile. We will paint the tiles on our TileMap.
Getting ready
For this recipe, we are going to continue from where we left off in the last recipe.
How to do it…
First, we are going to create an alternative tile to add a collision layer to the tile:
- In the TileSet editor, go to the section to the left of the sprite sheet. Left-click on Select, which is between Setup and Paint.
- In the TileSet editor, right-click on the upper-right tile in the sprite sheet. It’s the one that we changed the color of.
- Left-click on Create an Alternative Tile from the drop-down list.
- In the Inspector, left-click on Physics Layers in the TileMap properties located under Tile Size.
- Left-click on + Add Element.
- In the bottom panel, left-click on the tile we just created located under Alternative Tiles.
- In the section to the left of...