Hex Coordinate System

What coordinate system is the hex grid using? Is it offset R odd?
Do you know how I can convert from cubic/axial coordinates where 0, 0 is at the origin, to the gridgraph hex coordinates, where 0,0 is bottom left of the parallelogram?

Hi

The hex grid is a normal grid behind the scenes, with 60 degrees between the axes instead of 90.
So they are axial coordinates. See Hexagonal Grids for more info.

If you want the center of the grid to be your origin, then subtract (width/2, depth/2) from the node’s coordinates (node.XCoordinateInGrid and node.ZCoordinateInGrid).

See GridNodeBase - A* Pathfinding Project

Thanks. I’m still struggling to match them up to my implementation of a hex grid.
If you can see below, top coordinates are the centred coords from your graph (calculating S for cubic), and bottom is my grid using cubic.
Can see on the other two axis I potentially could swap my Q and S values. Moving north east though adds to both Q and R which is not what I was expecting. Do I need to flip some values around?
image

Also using your ALINE asset to debug this, so thanks for that too!

It’s not the end of the world if I can’t match them up because I can just use the nodes world position to get the correct cell on my graph.