View Full Version : Urgent help needed: mouse picking in OpenGL
03-20-2001, 09:55 AM
for my current project, i need to fix the 2-D coordinates (3-D would be nicer) of a 3-D object in an OpenGL scene. i tried to use the 'gluUnProject' routine which works fine except when the object is rotated! Any insights deeply appreciated!
03-20-2001, 11:33 AM
Please, write, what kind of coords you need - transformed or untransformed. If you need transformed coord, then use gluProject function. Otherwise, I dont understand why gluUnProject doesnt work. Maybe you got wrong PROJECTION, MODELVIEW or VIEWPORT matrices?
03-20-2001, 11:51 AM
Thanks for the reply! anyway what i want are untransformed coordinates.
I'm doing 3D human-body modeling in OpenGL. right now i need the ability to fix the original coordinates of a point on that body using the mouse. So far, i am able to do that as long as the object is not rotated (translation and zooming don't seem cause any problems!).
but once the object is rotated (eg. when i need to have a point on the back of the body), i get incorrect coordinates from 'gluUnProject'.
Thanks for any suggestions!
03-20-2001, 12:34 PM
I solved the bug, its a human one: i accidentally pushed the rotation matrix off the stack.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.