first person shooter camera question

I know i have asked this before but how exactly do you rotate and translate a camera for first person???

i am familiar with vectors but what exactly is a matrice?

thanks a lot

Try link :
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg1.htm
Good luck.

Actually camera doesn’t move or rotate at all , camera is static and the environment is moving around it, ok it depends how you see it, but believe me your 3d card won’t rotate camera but whole world except camera…

First you translate whole world by negated camera’s position, then rotate whole world around y axis (the vertical one) and finally rotate whole world around x axis (the one from left to right). When you’re dead instead of rotating around x do it with z axis, and that’s all!

yes i know about the camera not actualy moving but… the only prob i have is that when i rot around x and y it rotates from the middle of the object not in the center… here is what my code was (the syntax isnt real, just showing you how my code was…)

translate(0.0f, 0.0f, z);
rot(x, 1.0f, 0.0f, 0.0f);
draw_World();
if(keys[UP]) z++;
if(keys[DOWN]) z–;
if(keys[left]) x++;
if(keys[right]) x–;

please please please help!

thanks

Hi,

Did You check the link gived by zsolti ???
On GameTutorials.com is PERFECT tutorial for You. It is just this what You want!!!

cheers
yaro