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 2 of 2

Thread: Moving 3D objects

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2001
    Location
    Blagoevgrad,Bulgaria
    Posts
    20

    Moving 3D objects

    How can I move 3D objects,for example, by pressing the direction keys?

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Grenade, Spain
    Posts
    14

    Re: Moving 3D objects

    Have you try the glut Keyboard routine?

    You can use variables to specify position of 3d objects. When you press a key, you can decrement or increment its value. You move the object with glTranslatef(x,y,z) before displaying the object.

    Now I can't remember the name of the glut function for keys, but if you have the specification, you can look it up.

Posting Permissions

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