View Full Version : Moving the observer
How do i manage moving the observer and rotating him on the spot?
You cant really "move" the camera, you have to move/rotate the object instead.
say you want the camera to turn 90deg, you actually have to rotate the matrix 90deg to the other direction beofre you draw the cube...
I know I cant explain very well, but I guess you get the point..
11-17-2001, 04:56 PM
There is no such thing as a camera in OpenGL, so I will use the word to describe the position of the "observer".
There is a function called gluLookAt that takes 9 arguments.
the first three are float values that are the camera's x, y, z coordinates respectively.
the second three are float values that are the x, y, and z coordinates that the camera is looking at (respectively).
The last three are floats also, and they are the camera tilt. They should always be 0,1,0, unless you want your world to be upside down, then they would be 0,-1, 0
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.