How do I use the AutoTile in Godot 3.0?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mateusak
:warning: Old Version Published before Godot 3 was released.

Does someone know how to setup and use it?

:bust_in_silhouette: Reply From: BallzMcGee101

After attaching a TileSet to a TileMap, you can do the following steps:

  1. Select the TileMap
  2. Open the TileSet from the inspector
  3. Expand the child you wish to use as the autotile
    a) You should create the TileSet using a single Sprite node that holds the entire sprite sheet, rather than making a separate Sprite node for each tile.
  4. In the expanded view, check the “Is Autotile” box.
  5. Below the output box (at the bottom of the editor), you should see several tabs, one of which is called Autotiles. Select that tab to enter the Autotile view.
  6. You will now see several tabs: Icon, Bitmask, Collision, Occlusion, Navigation and Priority.

To setup autotiling, use the icon tab to select which tile is displayed in the tile sidebar, the bitmasking tab to draw the manner in which the tiles interact, the collision tab to create the tile’s collision shape(s) and the priority tab to select what tile should be drawn by default. I haven’t used the occlusion or navigation tabs yet, so I’m not certain how they work, but they are similar to the other tabs in implementation. In order to get the autotiling to work, the most important tab is the bitmask tab. I was unable to find an actual tutorial on this subject yet, but I found this demonstration which should give you a better idea of what is happening: autotile demonstration.

Anyway, hope that helps. Let me know if it does/n’t!

wow, thanks!

boruok | 2018-02-07 20:32

Very nice, thanks. Can you help me a bit more? I’m having trouble setting up the collisions. To make them work i’ve tried to create the tileset resoure in various ways:
only the Sprite, the Sprite with child StaticBody and the Sprite with child StaticBody with child Shape2d.
Most of the times the colliision shape i draw wont be added. Im using the “show collision shapes” debug options to check it. And when it show up, the collision is broken, my character only stops when its already completely inside the tile.
Im thinking its a bug, but i want first to try and do it the right way. Can you help me in setting up the collisions in the Autotile?

falquinho | 2018-02-22 21:44

Look at this tutorial

flashwebdev | 2018-03-28 11:43

Has this changed? I’m using 3.1.1 and don’t see an Is Autotile property. I do have a Tile Mode property that can be set to AUTO_TILE, but it doesn’t reveal Icon, Bitmask, Collision, Occlusion, Navigation and Priority tabs. I’m lost :confused:

xicus | 2019-08-29 00:37

Hey there, just figured this out myself after looking everywhere and finding nothing. First click on your TileMap node, then click on the tileset you have chosen in the “Tile Set” option (should be right at the top of the TileMap properties under “Mode”). This should bring up a window at the bottom of the screen as well as the options in the “Inspector” tab where you can set your “Tile Mode” to AUTO_TILE. Click on the icon to the side of the bottom window that shows part of your tileset sprite. This should bring up a grid with your tiles in the bottom window. Click on this grid. This should change the settings under the “Inspector” tab to include an option to change the bitmask mode. It will be called “Autotile Bitmask Mode” and it should be directly under the “Tile Mode” property. Hope this helps somebody!

drewmolinet | 2019-10-11 00:58