hexagon grid drawing issue

While not preferable for your final product, try changing all of your int values to Num values. See what happens. Also focus on your code that deals with the X position of each new tile.

from your comments

…uh…..this worked. I don’t know why. =| I just did a global replace for ints to Numbers and it worked. Hm, will go back and manually replace to see exactly what int variable did it.

Oh! I figured it out. In drawHexTile() I had set inputX and inputY as int types. But in actuality, the positions being calculated were floating values, so they were being rounded to ints implicitly causing the misalignment. Simple mistake (by reflex), no magic involved after all in the fix.

Leave a Comment