Yes I ve got one idea. KEEP IT SMALL. If you scale everything a whole lot down. and zoom in you get the same results, but it looks a whole lot better. If you have this big values you get enormous clipping, if you scale it down for about a 1000 times, it looks way beter and the results are the same! Ive tried these sizes once in my first DB program and it looked OK, but then i tried it way smaller and it looked superb, way better than before. And the results are the same. Image two world both exactly the same only one way sharpen and clearer. With one whould you choose?
And about your problem: make somethin like this:
If get ground height(matrixno,x,z) > maxvalue then notmoveherethingy
or if upkey() = 1 and get ground height(matrixno,x,z) < then move camera up 1
i think that is easier. I don't like working with numbers. They are messy and unclear. work with variables, is easy to read and to change, without spitting through your entire code. If you have any other questions, please mail me.
By steel will thy flesh divide