Why does rotation change x & y

First of all, this is an awesome tool. Great API and experience! This feels like magic. I wish I would have found it earlier!

I am using object tiles with snapping to place them accurately onto my grid. This works nicely. I do have a grid size of 50px so they are placed at 50, 100, 150 etc. So far so good.

Now, placing something in the upper left corner will result in x=0 and y=50. Hm, why y=50? I would have expected 0. Now let’s rotate. I enter 90. Now suddenly my tile jumps(!) to one grid below, it’s now in the second row, still with x=0 and y=50. Let’s move it back up. Now it is at x=0, y=0. Nice! But only after rotating it 90 degrees. When I rotate in place (using the arrows) the object stays nicely but the x and y change arbitrarily between 0 and 50 for both x and y.

I am really puzzled how this is supposed to work or if I have misconfigured something. Or maybe I am using it wrong. What I actually would love to have is an option to place objects into tiles with the result being simple indices being returned, e.g. upper left corner returns xIdx=0, yIdx=0; the one to the right should return xIdx=1, yIdx=0 and so on. This would allow to use the power of object tiles and their properties but still have an even grid.

Is there such an option?

1 Like

Tile objects have their origins in the bottom left corner, rather than the top left or centre as you’d expect. When rotated, they rotate about the origin rather than about their centre.

This allows for easier precision placement, but it is rather unintuitive.

1 Like