PDA

View Full Version : How to use gluUnProject ?



jirkamelich
12-03-2002, 10:59 PM
Does somebody know how to use gluUnProject to get where on axes x,z,y did i click ?

ae97004
12-04-2002, 01:27 PM
See glunproject i think gives you the screen space x,y coordinates depending on the z value you send to it, if you sent it the far clipping plane and the near clipping plane values seperately then you can interpolate based on the z value you have to get the screen space x,y and then use the inverse matrix transforms to get the output you need..
this is the way i made it work, though i did not learn to make the Z coordinate work properly..if you find out please do post it..

Thanks
ae97004

jirkamelich
12-05-2002, 03:20 AM
Can you please write here some example ?
Thanks Jirka