opengl 3d camera Q?

BlitzMax Forums/BlitzMax Programming/opengl 3d camera Q?

Smurfpuss(Posted 2005) [#1]
im coding my own 3d engine and i am wondering about the camera position and rotation how is this done in opengl


Damien Sturdy(Posted 2005) [#2]
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 :(


teamonkey(Posted 2005) [#3]
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'.


Shambler(Posted 2005) [#4]
Woot! http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=10


Damien Sturdy(Posted 2005) [#5]
hey, i never knew of that command!

I went and made my render routine rotate everything by a camera's angle!!! ^.^