0 votes

Does someone know how to setup and use it?

asked Jan 13 in Engine by mateusak (981 points)

1 Answer

+6 votes

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!

answered Jan 31 by BallzMcGee101 (26 points)

wow, thanks!

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?

Look at this tutorial

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.