how do i do camera rotation with matrices

Hi !

There are lots of ways to do it, I think the best thing is to look up a matrix tutorial at google and have a look at it.

Normally you have a matrix that holds the rotation and multiply it with an existing matrix of someform (the modelview matrix for example) and the resulting matrix then contains the modelview matrix with the added rotation.

But it’s a bit more complicated then that, some times you ned inverse matrices to get the correct result and so on…

It would be a bit easier if you would explain what it is you are trying to do.

Mikael

i am trying to make a set of functions to handle camera movement in opengl.

camrotx()

camroty()

camrotz()

and another to move the camera according to its direction

http://home.wanadoo.nl/fam.dubbelboer/files/matrix.zip

This is my matrix and vector class.

You can look at it and play with it to find out how marices work.

The zip file also contains a FAQ about matrices.