I did it once where I took a plain that is the screen size (640x480) and placed it away from the camera until it took up the whole screen exactly. I then used that distance as the value for the distance that the mouse is (lets call it the z value). X and Y remained the same as MouseX and MouseY (as I recall there was a bit of trouble with that and it required some tweeking) and the Z was constant.
Then I created a box that is 1x1xREALLY BIG, positioned it at the camera and rotated it such that the it would pass as a line from the camera coords to the mouse coords and check for collision.
I will try to get some code up tomorrow, but no promises. I lost my old stuff due to corruped hard drive, but I did have it working.
Make sense?
Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose