How to make hit areas for a tile?

If I have a tile asset, for an obstacle, that needs a certain hit area within the tile (so if another object overlaps that hit area a collision occurs), how do I pull that off in the Tiled interface, so when I export the xml, I don’t have to edit it manually?

I need to know how to pull this off using the Tiled interface, so I don’t have to teach my friend, the artist/illustrator on this project, how to code, or end up having to do it all myself manually in the xml.

It is possible to define hit areas of the tiles using the Tile Collision Editor, available from the View menu:

1 Like

Thank you, this does answer the initial question, and I now know that yes there is a way, but with regard to how he uses it:

Does he just select the tile, draw some shapes in the collision area, and then expect it to automatically save his edit?

He selects the tile in the Tilesets view, then he opens this Tile Collision Editor when it isn’t open already, and draws or tweaks some shapes.

While editing these collision shapes, the tileset needs to be part of the map. Any changes will be part of the undo history of the map as usual and the changed tileset would be saved embedded in the map.

If the tileset used is an external tileset (.tsx file), then he will need to (temporarily) import it using the Import Tileset button in the small Tilesets view tool bar. When he’s done editing the collision shapes he would re-export the tileset, overwriting the existing external tileset file with the updates.

1 Like