Rotating square tiles by 90, 180, 270

When tiles are square, they can be rotated by 90, 180 or 270. This would avoid having to create the same tile 4 times in the tileset. This is particularly usefull when tiles are roads/paths etc.
I know it is possible to rotate in the Objects layer, but the above feature request :slight_smile: is for the map layers.
I understand this would require to store some property for each tile on the map, but maybe it could be stored as a rotation array for all the tiles in the Layer Properties?

Thanks

1 Like

You can rotate / flip tiles too. I think the keys for that are x, y and z. But i am on the phone so I cannot check it at the moment…

1 Like

Right, as @Ablu points out this feature is already there. The X and Y keys flip the current stamp on the respective axis, while Z and Shift+Z keys rotate it by 90 degrees in different directions. Flags are used for each cell to store whether the tile graphic should be flipped horizontally, vertically or diagonally.

1 Like

Excelent!
So the flags in the MSB (most significant byte) seem to be :
0x80 - flip X
0x40 - flip Y
0x20 - flip diagonally

or in rotations (clockwise)
0xA0 - 90 degrees
0xC0 - 180 degrees
0x60 - 270 degrees

thanks

Check the official documentation for this:

Rotating is a combination of different flips, yes.

Regards,
Ablu