Rotate hexagonal tiles 60 degrees

When I press the Z or X, the tile is rotating 90 or 180 degrees even if it is hexagonal.
Is there a way to rotate it by 60 degrees?

There are only three flipping bits and it is not possible to specify 60-degree angles this way.

In addition, I don’t think 60-degree rotation would work very well, depending on your graphics style. Since it doesn’t map well to pixels, it would always blur the graphic and the edges. And of course it would only work with perfect hexagons, which are not so common in games (usually they are squashed a bit, for perspective or pixel-alignment reasons).

Thank you for the information :slight_smile:

we developing turn based education game in 3d, and we plan to use tiled as best tool on the market to create hex map for our game. Map is completely 3d, so we only want to tile coordinates, id and so on.

We need rotation badly, because it helps reduce amount of content need in our game, we can fill out levels with lesser amount of same assets with different rotation, to keep fresh look.

As i mention before, our game is completely 3d so we don’t have any issues with 2d images of hexagons, as we simply don’t use it at all.

So we think about tweak Tiled for our needs,

As i think 3 bits = 7 possible position, so it possible to encode in this 3 bits 360/60 = 6 possible rotation of hex tile, and keep rotation in last 3 bits of data.

So my question is: is Tiled project have interest in such functional so we can push it in upstream, and can we ask about some guidance when doing this, to keep it in a way where Tiled project going.

Best regards
Alexey

Hey @Alexey_Kruchenok, thanks for asking! Since the feature was requested before, it’s not unreasonable to see if we can add support for this in Tiled for everybody.

The problem is of course that there are already 3 bits reserved for flipping, but that they are not enough for hexagonal tiles. This is mostly since they are not just for rotation, but actually mean flipping along various axis (x, y and x+y). This way, for orthogonal maps not just rotation in 90-degree steps is achieved but also flipping either horizontally or vertically.

Now, it actually never makes sense to flip a hexagonal tile along the x+y axis. It would turn a pointy topped hex into a flat topped hex and vica-versa. So maybe we could instead say that this bit means “rotate 60” for hex maps. Unfortunately, then we’re still 4 combinations short:

So I we’d need another bit for 120 degree rotation for example, if we wanted to support both rotation and flipping on hexagonal maps. I do think it would be nice to support this, and I could certainly try to help you add the feature in a way that it can be merged.

Hi Bjorn, our developer did preliminary integration of this feature into Tiled, https://github.com/bjorn/tiled/pull/1447

So can you review his approach and/or give him guidance to make it in way to include this feature into codebase of Tiled.

Thanks