Open Yureii opened 5 years ago
I experienced the same problem.The fix will be:
function hxm.getCoordinates(rad, x, y, ox, oy) local height = 2 rad local width = (math.sqrt(3) / 2) height
local rx = x * width + 0.5 * y * width + ox
local ry = 0.75 * y * height + oy
return { x = rx, y = ry }
end
https://github.com/icrawler/HexaMoon/blob/9594d8b7f8d791e5ae3c30a195053fabbaf564d2/HexaMoon.lua#L46