View Full Version : first person shooter camera question
02-13-2003, 08:23 PM
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
02-13-2003, 10:56 PM
Try link :
02-14-2003, 05:32 AM
Actually camera doesn't move or rotate at all http://www.opengl.org/discussion_boards/ubb/smile.gif, 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!
02-14-2003, 08:06 AM
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);
please please please help!
02-15-2003, 05:04 AM
Did You check the link gived by zsolti ???
On GameTutorials.com is PERFECT tutorial for You. It is just this what You want!!!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.