
Screen coordinates to Object coordinates without gluUnProject
Posted Tuesday, 1 May, 2012 - 20:56 by samssonart inI've been looking the forums and checked online tutorials, I want to know how can I convert screen coordinates to object coordinates, so I can draw objects using the mouse. I've seen many solutions to this, but all of them use the Glu.unproject function, which appears to be deprecated. So I want to know if anyone knows of another way to do this that won't rely on deprecated code.


Comments
Re: Screen coordinates to Object coordinates without ...
http://www.opentk.com/node/1276
Re: Screen coordinates to Object coordinates without ...
Thanks, I had seen that post already, what I meant is that the results that get out of gluUnProject are not reliable when using perspective projection, or maybe I just don't know how to properly use it, but results are weird. I want to know if anyone knows of another way to do screen-to-world-coordinates convertions.
Re: Screen coordinates to Object coordinates without ...
In Fact you have to project your point as Vector through your current Matrices (Modelview & Projection) by using
Vector_Projection. This isnt anything else than UnProject do!