Hi All,
I have come to a "deal breaker" situation unless I can overcome the following problem.
I have been trying to position the view camera where a pilots eyes would be in a 3D aircraft.
Basically a flight sim where the pilot can look around and should see the aircraft cockpit around him.
I get massive shake of the 3D aircraft as the camera is in any sort of motion, even if it is moving very slowly. (maybe the precision of calculations within this game library is too corse?)
I suspected that I had somehow messed up the position coupling for the aircraft to the camera.
As a test I placed a sphere of 1 meter diameter, 1 meter in front of the camera but using the camera Co-Ordinate information.
No way to mess that up.
This produces the sphere
dbMakeObjectSphere ( 999, 1.0f );
dbSetObjectWireframe ( 999, 1 );
This positions the camera from data from its data structure.
dbPositionCamera ( Camera.fPosX, Camera.fPosY , Camera.fPosZ);
dbXRotateCamera ( Camera.fRotX );
dbZRotateCamera ( Camera.fRotZ );
dbYRotateCamera ( Camera.fRotY );
And this keeps the sphere 1 meter in front of the camera.
dbPositionObject ( 999, Camera.fPosX, Camera.fPosY , Camera.fPosZ);
dbXRotateObject ( 999, Camera.fRotX );
dbZRotateObject ( 999, Camera.fRotZ );
dbYRotateObject ( 999, Camera.fRotY );
dbMoveObject (999, 1.0f );
Has any one found a way around this sort of problem, as it makes it impossible to have a view point within any sort of vehicle, as the jittering is very bad.
I am happy to post a demo (proof of concept) of the flight sim demonstrating this problem, or even the full source code if it is required for solving this problem.
Any help would be greatly appreciated.