im coding my own 3d engine and i am wondering about the camera position and rotation how is this done in opengl
opengl 3d camera Q?
BlitzMax Forums/BlitzMax Programming/opengl 3d camera Q? Frmo what i know, you need to SUBTRACT the angle you want the camera to point to, from the entities.
See terrabit's code for an idea.. im away from source again so i cant post how i did it :(
See terrabit's code for an idea.. im away from source again so i cant post how i did it :(
gluLookAt is the command you want. It takes 9 floats as parameters - the first three are the x,y,z co-ordinates of the camera, the next three are the x,y,z of the target, the last three are the x,y,z of a vector specifying which way is 'up'.
hey, i never knew of that command!
I went and made my render routine rotate everything by a camera's angle!!! ^.^
I went and made my render routine rotate everything by a camera's angle!!! ^.^