Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
No, it does not really do what I require or asked for. It was helpful, but what I want is that the texture scales to the size of the hexagon and that it starts drawing the texture at the start of each hexagon. I'll edit my question. I already fixed the not starting to draw at each texture with my previous comment.
I fixed my above concern by not adding the start position to every float in the vertices float[] but instead using sprite.setPosition(start.x, start.y).
Okay, that looks prettier, but doesn't really do what I want. That makes the image repeat next to each other and under each other. But that means that each hexagon looks different (the texture repeats so on the second hexagon, the texture is already halfway on the first hexagon). I just want to start drawing the texture on the top left of each hexagon.
Thanks a lot, I decided to use the last option, if I have an image that is not square, I simply make it square. In game it will then be transformed to not be square anymore.