ShadowyCore:I would have thought that that yellow line would have been invisible, or at best a point because it was straight through the cursor. Am I doing something wrong with this?
But it's a ray through the cursor to the scene's maximum depth, so unless the cursor is in the center of the screen, you should get a perspective projection of it. I wouldn't have expected a horizontal line, though...
You're using the Unproject method correctly, and I know it works fine in winforms (I just implemented picking in winforms the other day, though I'm picking models rather than points in a plane). I don't see anything wrong with your posted code at all, to be frank. So my only guess is that the problem lies elsewhere; perhaps in your GetClosestVertex method?