Greetings all,
This is kind of the continuation of a thread below on gluUnProject - I''m trying to write a demo that draws a prism and allows the user to drag the prism around the XZ plane. I''ve updated the sourcecode in the page in my sig. Obviously what I''m doing now isn''t working

.
My idea:
What I''m thinking is, suppose you click and start dragging the prism. I would assume you want to change the coordinates of the lower-left corner to be the point on the XZ plane that would project to the current mouse coordinates, with possibly an offset because likely the user won''t click on that one corner.
The best idea I can think of to get that would be to, before rendering the scene, render the XZ plane and call gluUnProject to return the point on it that would "map" to the mouse. Then change the coordinates of the prism, clear the buffers without calling glSwapBuffers and render the scene.
That sound like a reasonable plan? Obviously it would be better to do my own math, but if I can avoid reinventing the wheel, why not?
I''d love to hear comments, criticisms, other ideas etc if anyone has them!
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)