   Unprojecting vertices ???
  Hi, i am working on object selection and translating/rotating/scaling using the mouse. Everything goes well till now. Everything works except moving the objects properly. I have been struggling getting an appropriate formula for moving objects on a rotated/translated axis (x/y, y/z or x/z) when the mousecursor moves, keeping the once clicked spot on the model directly underneeth the cursor. I am now close, but the code is a MESS , actually it's so messy i will have to write it again.I read on this forum a while ago that Microsoft added an unproject function to their matrix class. This would be a simple and fast solution if i could add an UnProject function to my own matrix class.Does anyone now of some articles about unprojecting ?Thanks in advance![edited by - Tree Penguin on February 11, 2004 5:39:16 AM]
  Hi!I think what you need it gluUnProject().cya,Drag0n -----------------------------"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich CookMy future web presence: Dave''s Programming Resources;  Too bad i am using my own matrix class all over my project, i don''t think i will be able to use the gluUnProject function  unless i could SET the OpenGL matrix , does anyone know how?Anyway i am still interested in articles/info un unprojecting (always handy to know).Thanks in advance. ;quote:Original post by Tree Penguin  Too bad i am using my own matrix class all over my project, i don''t think i will be able to use the gluUnProject function  unless i could SET the OpenGL matrix , does anyone know how?glLoadMatrix();You might try reading gl redbook first next time You should never let your fears become the boundaries of your dreams. ;  Hehe, sorry. I am pretty busy this week (got a concert to prepare for ) so i didn''t really think of that, instead a method costing me less time was what i thought of .I promise i will look better before posting my question here next time . 