PDA

View Full Version : gluUnProject - problem when moving objects



grodslukaren
07-23-2001, 08:20 AM
I have problems when I do gluUnProject...

I`m using gluUnProject when I move a object in my space. By converting the coordinates of the mouse to objects coordinates I can move the object, I use a timer do update the new position 10 times a second... the first time I do gluUnProject every thing works fine, which means that I can insert the object I later want to move, but the second time I move, the (un)projection becomes very strange...

When I look up the variables, then there are no difference between the first screenX and the second one, the mouse is placed in (60,70) in the both projections, but the result is totally different...


Anyone who has seen something like this???

/grodslukaren