Hey!
Sorry for late answer, I was overrun by the tasks on our projects.
Rivers do not belong to any single Hex, they start and follow borders, only final (last node) is within watery hex to ensure it does not end on the beach.
We start from some random hex, and then try to move to one of the corners:
Note that the corners are no longer full integers.
//this randomizes integer: 0 or 1, unity documentation is wrong saying that 2 would be included as possible result.
int offx = UnityEngine.Random.Range(0, 2);
int offy = UnityEngine.Random.Range(0, 2);
//Now we by offseting by -.5 we acheve values of -0.5 or +0.5 (form 0 or 1)
fPos.x += offx - 0.5f;
fPos.y += offy - 0.5f;
//if both x and y get their roll as 1, then z have to be 0. if both are 0 then z need to be 1.
//in other cases we let z to roll its own fate
//this is to ensure that neve three values goes the same direction. As in hexagonal space if two goes up then third have to go down etc...
if (offx == 1 && offy == 1) fPos.z += 0.0f - 0.5f;
else if (offx == 0 && offy == 1) fPos.z += UnityEngine.Random.Range(0, 2) - 0.5f;
else if (offx == 1 && offy == 0) fPos.z += UnityEngine.Random.Range(0, 2) - 0.5f;
else if (offx == 0 && offy == 0) fPos.z += 1.0f - 0.5f;
//resulted coordinate will give you eg (-0.5, 0.5, 0.5) which is corner between: (0,0,0), (-1,1,0) and (-1,0,1)
//to see relation between those numbers better lets align them all:
//River: (-0.5, 0.5, 0.5)
//hex1 : ( 0.0, 0.0, 0.0)
//hex2 : (-1.0, 1.0, 0.0)
//hex3 : (-1.0, 0.0, 1.0)
Hopefully this helps you understand it better
if not give me a shout and I will try to explain better!