First Person Camera

Started by
5 comments, last by novasheep 21 years, 6 months ago
Any one got a code for a first person camera view?
Advertisement
hem

you could write it on your own

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glrotate(into the view direction);
gltranslate(vieworigin);
glMaxtrixMode(GL_MODELVIEW);
http://www.8ung.at/basiror/theironcross.html
it''s my opinion that the projection matrix should never be used for camera movement/translation..

<-- smile :-)
Not quite code, but an idea...

Store angles, position, and up/side/front unit vectors

Each time you update the view matrix, update all your unit vectors from that matrix.

To move ahead/Upwards/Sidewards (does that word even EXIST?), just add corresponding unit vector * distance to your position vector, and update the matrix.

Or wait until Extatica and it''s cool camera system designed by me in person is out ;-)

Extatica is coming soon!
Check it out on:
http://www.extatica.com02.com
Nexeruza Studios:
http://nexeruza.ionichost.com/home.html
quote:Original post by RipTorn
it''s my opinion that the projection matrix should never be used for camera movement/translation..

<-- smile :-)


thats your choice i use it

http://www.8ung.at/basiror/theironcross.html
And why not just use the view matrix?
because some people think it is easier
but i personally think its easier to use the view matrix cause older 3d shooters i am modding for do it the same way

[edited by - Basiror on October 20, 2002 5:54:23 AM]
http://www.8ung.at/basiror/theironcross.html

This topic is closed to new replies.

Advertisement