PDA

View Full Version : mouse and keyboard inputs



10-29-2000, 03:09 AM
Hi, I'm very new to this subject and would really appreciate some advise!
I am attempting to perform translations after mouse/keyboard events. For example,user clicks the left mouse button and
an object is tranlated, centred on the exact co-ordinates of the position of the mouse. This process is repeated until another event is received. I don't understand how to calculate the new position that the object should move to!!!

Initially I think i should draw the object centred on the origin and then translate it to a starting position. The mouse is then clicked and the object should move to the new position. (this is what i need help with) Thank you very much.

zed
10-29-2000, 12:21 PM
use gluUnProject example code with glut also u might wanna have a look at the faq

Gavin
10-30-2000, 06:06 AM
if you mail me your address then I can send you some sample code

gav