Free flight camera
Posted: Sun Aug 02, 2009 11:42 pm
Hi
I'm trying to build a space simulator app using your engine and I've ran into a problem with the camera.
Since I need the camera to work as a flight simulator I removed the restriction:
if (pitch > 1.55f)
pitch = 1.55f;
else if (pitch < -1.55f)
pitch = -1.55f;
But this seems to create some problems with the camera. If you rotate it up and around a bit the pitch will soon be inverted and you will get a jerky camera that at some angles jumps between different views.
I've googled a bit on this subject and the suggestion has been to normalize the quaternion's which I've added to the camera but I've still got the same issue.
Do you have any suggestions of what might be wrong with the camera?
I'm trying to build a space simulator app using your engine and I've ran into a problem with the camera.
Since I need the camera to work as a flight simulator I removed the restriction:
if (pitch > 1.55f)
pitch = 1.55f;
else if (pitch < -1.55f)
pitch = -1.55f;
But this seems to create some problems with the camera. If you rotate it up and around a bit the pitch will soon be inverted and you will get a jerky camera that at some angles jumps between different views.
I've googled a bit on this subject and the suggestion has been to normalize the quaternion's which I've added to the camera but I've still got the same issue.
Do you have any suggestions of what might be wrong with the camera?