View Full Version : Moving object with mouse cursor

04-18-2003, 06:30 PM
I am trying to move my object with a mouse cursor, but I want the object and the mouse cursor to be in the same location when I am dragging the object.

I tried gluUnproject on mouse cursor coordinates to object coordinates.

However it returnes values between +/-0.9 and +/-0.6.

But my object is translated to coordinates -1.55, -1.38, 1.8 on the screen. So what am I doing wrong?

I am using gluPerspective so it is a 3d object.

04-21-2003, 08:59 AM
I too would like to know how to do this