Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: mouse and keyboard inputs

  1. #1
    Guest

    mouse and keyboard inputs

    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.

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: mouse and keyboard inputs

    use gluUnProject example code with glut also u might wanna have a look at the faq

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    668

    Re: mouse and keyboard inputs

    if you mail me your address then I can send you some sample code

    gav

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •