Advertisement

Can't move the camera???

Started by November 18, 2000 12:00 PM
11 comments, last by Dunge 24 years ago
I know that you can do like if the camera is moving by translating the faces but we really can''t move the camera from is 0,0f center point?? I can''t imagine how a game like Quake3 can work without moving the camera but moving all the faces???
Nope, as you''ll see in lessons 10 and 23 all that happens when the ''camera'' moves is that the world moves around you--you always stay at 0,0 you move based on a lot of math that makes it appear you are moving while it is the only thing moving. When you look at a game like Quake 3 Closely you will see this to be true there as well



Open mouth, insert foot
Advertisement
You''re kidding right??! Why would the makers of Quake do all that when they only have to use the LookAt function? The LookAt function allows so many more possibilities.. :/

far out..

- wav
LookAt???
yeah, the glLookAt() function..
Okay...
How many times do I have to say it I am a dumbass so you shouldn''t listen to anything I say unless A. Someone''s backing me up on it or B. You''ve tried it yourself. I can''t even remember how many times I''ve made that point! Jeeeeeeesus.



Open mouth, insert foot
Advertisement
actually oglman is correct in fact the world moves and the "camera" stays put. but i like to think of it the other way around (easier on the brain)
http://www.frii.com/~martz/oglfaq/viewing.htm

http://members.xoom.com/myBollux
quote:
wAVaRiaN wrote:
You''re kidding right??! Why would the makers of Quake do all that when they only have to use the LookAt function? The LookAt function allows so many more possibilities.. :/


All the gluLookAt function accomplishes is to tell OpenGL where (and how much etc.) to move the world.

Moving the world is accomplished by setting a transform matrix (e.g. through gluLookAt, glOrtho, glPerspective etc) every point in the world is then multiplied with this transform matrix, to position it with respect to the camera.

However, you can think of chaning this matrix as modifying the camera (eg. "camera moves one meter to the left" is the same as "world moves one meter to the right").

It''s the gluLookAt() function.

And oglman is completely correct. The "camera" does not really move, but through a series of transformations of the MODELVIEW matrix, the "world" around it moves.

The gluLookAt() function isn''t part of the basic OpenGL command, and encapsulates all the basic commands such as glTranslatef(), glRotatef(), etc. and just makes it a little bit (a lot) easier on the programmer.



______________
Martin Estevao
lpSoftware
______________Martin EstevaolpSoftware
It appears that you are actually correct oglMan

I like to make it easier for myself lol

cyas l8r

- wav

This topic is closed to new replies.

Advertisement