TileMap: Placing Larger Tiles + Misaligned in Viewport

Godot Version

4.3

Question

When painting larger tiles in a level that are larger than my base tile size (32x32px), they are placed using the center of the tile as the anchor. This results in tiles being difficult to place and not aligning with the TileMap grid in the editor viewport when a TileMapLayer is being worked on. Is there a procedure for placing larger tiles? Or using the top-left as an achor point?

In the TileSet panel at the bottom there is a 1x1 orange outline in the center of each tile, which I’m guessing is the anchor/placement point?

Thank you so much!

Found an answer on the Discord from HeraldOfFire.

“You want the texture origin setting.”

If anyone else encounters this:

Texture Origin formula is: - (larger tile size in px / 2) + half base tile size in px
So, if base tile/grid size = 32x32, and you make a tile that is 4x4 (so 128x128px), formula is: - (128 / 2) + 16 = -48

Also, if you’ve already created collisions, you will likely have to re-position the polygon.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.