Before OpenFl 4 there was a way of defining Tile’s central point of rotation, IIRC like so: Tileset.addTileRect(rectangle, point).
Now, it seems default rotation point is at 0,0.
As a workaround I’m shifting x,y using trigonometry: var shift_x = width_half * cos - height_half * sin; var shift_y = width_half * sin + height_half * cos;
But I imagine calculating Sin and Cos on every angle change on every Tile is time-consuming.
Is there a faster way of doing this? Maybe utilizing Tile.matrix?
Thx for the hint @loudo, i ended up using matrices after all. Despite what @restorer posted some time ago, all seems to work fine with 4.4.1.
Matrices are amazing to work with, combining transformations is just plain pleasure