Hi, I’m trying to understand how collision point data in the TMX is interpreted.
I have a isometric map whose tile size is 256 x 148.
What I understand from the collision point data is that the 0,0 origin point corresponds to the left point in the ‘isometric diamond’. I imagine the map’s tile superimposed over my tile image at the bottom and left-hand side of the frame and the left corner of the diamond tile is 0,0. This seems to correspond accordingly to the anchor point of the tile when being placed on the grid. So far, this is what I understand.
What I don’t understand is when I use a larger tile image in the same map. I’m using a 312 x 352 image, and when I manually input 0,0 inside the TMX via text editor, and then plot out a 256 x 148 isometric diamond (in the same way I’ve done for the other tiles at 256 x 148, I get the following:
As you can see, the 0,0 is about 8 pixels away from the left edge. The bottom node is about 5 pixels from the bottom edge.
In the documentation it states:
Each polygon object is made up of a space-delimited list of x,y coordinates. The origin for these coordinates is the location of the parent object. By default, the first point is created as 0,0 denoting that the point will originate exactly where the object is placed.
But when placed as a tile it seems to follow my understanding of the anchor point being referenced by the tile shape flushed at the bottom and left of the tile image.
As you can see with the image above, the tile’s placement is exactly bordering the left edge, but the 0,0 coordinates in the collision polygons are offset to the right.
Any info on this would be appreciated. Thanks!