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?
Free flight camera
Re: Free flight camera
The demos camera (both the one in the BEPUphysicsDemos and in the documentation mini-demos) were designed to use Vector3.Up as the camera's up vector, and includes no support for rolling. Using a quaternion to represent orientation won't give any more power without changing the camera's design.
However, I did make a little space game-demo using BEPUphysics a while back which included a simple free-rotating camera. I'll go ahead and fix it up and post it here in a little while. Someday I should get the whole game fixed up so I can release it as a sort of BEPUphysics starter kit.
However, I did make a little space game-demo using BEPUphysics a while back which included a simple free-rotating camera. I'll go ahead and fix it up and post it here in a little while. Someday I should get the whole game fixed up so I can release it as a sort of BEPUphysics starter kit.
Re: Free flight camera
Here it is. Let me know if there's any issues.
- Attachments
-
- QuaternionCamera.zip
- (1.24 KiB) Downloaded 297 times
Re: Free flight camera
Works great! Thanks a lot, probably saved me a week with the sample code you sent me!
Thanks again!
Thanks again!