Replacement for Tile's "center point" in new OpenFl 4 Tileset?

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?

I did the same way.

But Restorer did with matrix if you are interested to check it out.

Any informations on supporting this in future OpenFL versions?

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 :slight_smile: