Hi, how can I fit the tile in one grid? Tile is 8x8p and i’ve set them to be 8 in unit, not 100 like it was, and after generation the middle of a tile is not inside square unit per unit but at the 0.0.0 point, which makes it fit quarter in each 4 squares, not in one. How do I fix this? Thanks a lot!D
Hi, you can center the Tile in three different ways. This will depend on where the pivot of the Sprite in the Tile is and the position of the Tile on the Tilemap.
- Change the Tile Anchor of the Tilemap component to suit the pivot of the Sprite. The default Tile Anchor is (0.5, 0.5, 0), so I will assume that the pivot of your Sprite is in the top right corner for it to show up like that. A corresponding Tile Anchor would then be (1, 1, 0).
- Change the pivot of the Sprite in the Sprite Editor. With the defaults, the pivot of the Sprite should be in the middle (0.5, 0.5).
- Change the position of the Tile. Using the Select Tool in the Tile Palette (Cursor icon), you can select the Tile position on the Grid. This will show the Tile selected in the Inspector window. You should be able to change the position of the Tile within the Inspector. Try this only if you believe that the Tile Anchor and the pivot of the Sprite are both set up correctly.
2 Likes