Get viewing angle without camera position?
I'm trying to get the viewing angle normal of the camera, even though I don't have a camera location/viewing target location. Instead I'm using a fixed viewing angle, where the only operation is that I rotate the model matrix around the x angle to give a "tilt" to the view. Now I find I need the viewing angle for some angle of incidence calculations, but I'm having a little trouble finding the angle.
I could use some tips on converting a rotated model matrix into a camera angle.
you can get the camera position and orientation from OpenGL. glGetFloatv(GL_PROJECTION_MATRIX, mat) I believe.
something like that.
something like that.
What oliii said, but it's GL_MODELVIEW_MATRIX. Then you can get the transposed z-axis (which is the camera's forward vector) and work it out from that.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement