How to rotate camera centered around the camera's position?
Posted
by
tnutty
on Game Development
See other posts from Game Development
or by tnutty
Published on 2012-11-11T23:15:59Z
Indexed on
2012/11/12
5:16 UTC
Read the original article
Hit count: 196
Currently I am using gluLook at like so:
gluLookAt(position.x, position.y, position.z,
viewPoint.x, viewPoint.y, viewPoint.z,
upVector.x, upVector.y, upVector.z);
with the above, don't know if you need more information, how could I change it so that the camera acts like its rotating around itself, instead rotating around its viewpoint. You can see the current code at https://github.com/dchhetri/OpenGL-City/blob/master/opengl_camera.cpp, that class was adapted from codecolony.com.
© Game Development or respective owner