PDA

View Full Version : Rotate the camear with respect to object



Srija
10-19-2011, 12:44 AM
Hi,
I am developing a crane simulator. In that i want to rotate my camera by keeping the selected object in my view always. I am using glutlook at to set the camera eye, look vector and up vector. I am using arc ball rotation to rotate the camera. By default i am looking at the center of the crane body.
If I select the hook, i need to get the center of the hook and i want to ratate the camera so that the hook is always in my view but at the same time the scene should be rotating.

Please help