Fixed rectangular maps center point (#3646)

This commit is contained in:
GGGuenni
2021-03-04 17:50:34 +01:00
committed by GitHub
parent eb47272d09
commit 0bf7c2e07e

View File

@ -96,7 +96,10 @@ object HexMath {
} }
fun evenQ2HexCoords(evenQCoord: Vector2): Vector2 { fun evenQ2HexCoords(evenQCoord: Vector2): Vector2 {
return cubic2HexCoords(evenQ2CubicCoords(evenQCoord)) return if (evenQCoord == Vector2.Zero)
Vector2.Zero
else
cubic2HexCoords(evenQ2CubicCoords(evenQCoord))
} }
fun roundCubicCoords(cubicCoords: Vector3): Vector3 { fun roundCubicCoords(cubicCoords: Vector3): Vector3 {