Getting 3D ray from 2D point


I’m making a game where I want to be able to click on the ground to move a creature where I click… I need to convert the 2D point into a 3D ray… how can I do this with OpenGL?
The ground is made up of several polygons with different normals.

ok, i wont write the whole solution.
ill just direct you to the thread, 2dto3d, i opened, and happily, closed.
the solution is there, and it works.