Hi!
I have a working camera, I can adjust with the mouse to look around.
But now, I want the camera to be focused on one object all the time, no matter where the camera is.
I use glRotatef on my whole scene to make a “camera”…
But how do I calculate cAngle_x and cAngle_z for my focused camera, if I have the postion of my Camera (x,y,z) and my Object(x,y,z)??
Anybody an idea???
Thanks in advance!
Do you want one side of this object to always face the camera?
Or do you want the camera to rotate around the object as if you where walking around the object looking at it?
Originally posted by TheBlob:
[b]Hi!
I have a working camera, I can adjust with the mouse to look around.
But now, I want the camera to be focused on one object all the time, no matter where the camera is.
I use glRotatef on my whole scene to make a “camera”…
But how do I calculate cAngle_x and cAngle_z for my focused camera, if I have the postion of my Camera (x,y,z) and my Object(x,y,z)??
Anybody an idea???
Thanks in advance![/b][/QUOTE]