I have come across a sticky problem that may cause me to change direction a little bit.
It appears that most video cards and virtually most every game library use single precision floating point numbers for defining in 3D space the node positions for models, as well as the camera position.
The problem that I did not fully appreciate early enough is the following.
A floating point number looses accuracy in the decimal point part of its make up as it increases in size. IE: it is basically an approximation rather than an accurate number.
If I have an aircraft that is a long way away from the 0,0,0 origin point then small changes at that long distance are not accurately recorded in the floating point number.
Here is the problem.
I created a sphere that is at its closest point 0.5 Meters away from the pilot view point camera.
While ever the camera is close to 0,0,0 world coordinates then the floating point number is accurate enough to display that sphere as it should be.
If a person is flying lets say 100KM away from the games 0,0,0 world coordinates center point, then the numbers that the game works with are around 100000.xxx in value.
With such large numbers, the .xxx part is no longer recorded accurate enough.
Here are 2 pictures of an aircraft at around 100KM from the world 0,0,0 center point. The aircraft is moved a little between pictures to force the floating point numbers to change a little.
![Image](http://i16.photobucket.com/albums/b49/sydbod/untitled-1.jpg)
![Image](http://i16.photobucket.com/albums/b49/sydbod/untitled2.jpg)
You can see how the center line of the sphere is moved from one side of the target crosshairs, to the other side.
At long distance from the game origin 0,0,0 as the aircraft is moving, the sphere is madly jittering around the place.
The significance of all this is that I want to create 3D cockpits for the game.
These 3D cockpits jitter madly around the place in the same way.
It appears that I will have to re-normalise the camera location to 0,0,0 every frame before adding the 3D cockpit model, and basically fly everything in the game around a stationary camera, rather than fly the player around in a stationary world.
This will require me to change all the data structures and significant parts of the code.
The associate problem is that I have no way of moving the 3D terrain within this game library. I will have to build up my own terrain with discreet meshes and texture it. This will allow me to move my world terrain as I will now require with the new approach. This is another significant increase in code.
Oh well .... we see how things pan out.
Regards Syddy
![Smile :)](./images/smilies/icon_smile.gif)