0
votes

I need to find a way to rotate the camera in its own axis using glulookat. I need to calculate the up vector for this. Assuming the up = {0,1,0} intially. I need to rotate this vector by angle ax,ay,az and find the resulting vector to use in glulookat function. Is there an readymade method or any other easy method rather than applying combined rotation matrix multiplication on the unit vector (0,1,0) to do this?

1
glulookat uses lower level methods for modifying a modelview matrix, including one that directly rotates it. Why do you need to avoid that? Why do you want to do this the hard way?bames53

1 Answers

0
votes

Have you tried working with Spherical Coordinates? You just get the angles that you need to move with and then transform the spherical to cartezian coordinates and then you should be able to calculate the up vector.

http://en.wikipedia.org/wiki/Spherical_coordinate_system