So Thereโ€™s a few ways of adressing a hex on a hexgrid. One is regular square grid style co-ordinates (just offset), and another is Vector3 cube co-ordinates- For a better description and visual aids, check out this page on red blob games.

So up until now Iโ€™ve been addressing the hexes with regular offset x,y coordinates (well, theyโ€™re Vector3โ€™s but the z is just always set to zero, since tilemaps have a layering number so I donโ€™t have to mess with z space.) but because of the offset, I canโ€™t just use the kinds of functions I would on a square grid to do things like get grid spaces within a range. Iโ€™m basically still getting a square-like irregular shape on the hex grid when I want to be getting a circle. So I need to convert to three-vector cube co-ordinates. This (hopefully) will get me a lot simpler functions to get ranges and do other cool stuff like line-of sight math for fog of war.

Catlike coding has an offset to cube conversion tutorial, and Iโ€™m working on that now. Iโ€™m getting a little antsy because this is like almost week 9 of a 10 week quarter and I need to get this experiment in a place where if itโ€™s not finished as a game at least itโ€™s capped off in a way that I can sum it up. Iโ€™ve learned so much about programming in Unity on this project, but thereโ€™s still this vast gulf of stuff I donโ€™t know, and I have a lot of really weak spots as a beginning programmer. Progress not perfection.