Recommended Posts

I am trying to use gluUnProject to get the location of the mouse cursor, but the results I''m getting arn''t quite what I want.
The cursor is moving in the correct direction but it is staying close to the origin (or not even on the screen). Not matter what I set windZ to. Am I missing something?
I searched on google and didn''t see a good example useage.
Jason Mickela
ICQ : 873518
E-Mail: jmickela@sbcglobal.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------

Share this post

Link to post

Share on other sites

You understood correctly and it works now.. and in conjunction with my 3d terrain and ray-collision checking i can now see where the mouse clicks in exact 3d co-ords on the terrain.

BTW:Anyone know how to implement this using ray tracing from the eye through the mousex and mousey? That was my approach when i couldn''t get gluUnProject to work and i think it might be faster than calling gluUnProject.