First Person Camera
hem
you could write it on your own
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glrotate(into the view direction);
gltranslate(vieworigin);
glMaxtrixMode(GL_MODELVIEW);
you could write it on your own
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glrotate(into the view direction);
gltranslate(vieworigin);
glMaxtrixMode(GL_MODELVIEW);
it''s my opinion that the projection matrix should never be used for camera movement/translation..
<-- smile :-)
<-- 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
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
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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement