View Full Version : Camera in openGL
anyone knows how to create an interactive camera in openGL responsed to the keyboard input, like 'W' means going forward, 'S' means going backward, 'D' ratate the scene clockwise, 'A' ratate the scene anti-clockwise.
Thanks in advance
08-20-2005, 08:32 AM
create a class that does the transformation for you
08-21-2005, 07:57 PM
The Red Book (also known as the OpenGL Programming Guide) is your friend, especially the chapter on viewing. It'll tell you how to position the camera and move it around in your scene, or, alternatively, fix the camera's position and move the objects in the scene.
If you don't have a copy of the Red Book I believe you can find HTML and PDF versions of an older edition on this site. But get a copy if can swing it -- it's essential if you're serious about learning OpenGL.
09-22-2005, 10:33 PM
If you didn't find it yet, this is the code i think you need.
A c++ class just named Camera that allows you to move or strafe in all directions you want.
I hope it will help,
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.