How do I get the face of my mesh my cursor hits?

If you use normalized vectors, the dot product basically gives you the length of the projection of one vector onto another (actually it’s the cosine of the angle between the vectors). It is calculated as x1x2 + y1y2 + z1*z2.