First of all, I lookad at OppiCam.
It does not seem to do what B.O.B. wants to. OppiCam simply ignores the fact that Warcraft does not simply use Camera Height = GetLocationZ(P) + Custom Offset. Instead it uses a grid with (pre?)calculated camera heights and interpolates the height between them. Camera Height = InterpolatedCamOffset(P) + Custom Offset.
http://www.hiveworkshop.com/forums/jass-functions-413/getcamoffset-131434/
This is my try to fix that problem. It does not work with water (impossible to use GetLocationZ(p) on, it will return the water surface but the cam system uses the ground), nor does it work with doodads affecting the camera height (Something like overfly-height in the object editor, has to be set to zero then). Besides that, i did not try to get it to work near the map border, as i simply did not need it. Maybe I will work on the functions later, because it seems like they might be useful for someone, and even more useful when they work correctly.
So, back to the thread:
You are using GUI? So I assume that you are not using the newGen-Editor... The script is done in vJass so you would need the newGen-Editor to use it.
Download it, or otherwise wait for a non-newGen version (tell me that you would like me to convert it and then wait...).
In case you install newGen or already have it installed, then you can simply create a new trigger and convert it to custom text (somewhere in the menu). Then remove all the code displayed in the custom text box and paste all the code from library to endlibrary. You are done.
Now you can use the code like this: GetCamOffset(x,y)
or in GUI:
add globals tempLoc and tempOffset
[GUI] Set tempLoc = <your location>
[GUI] Custom Script: "set udg_tempOffset = GetCamOffset(GetLocationX(udg_tempLoc),GetLocationY(udg_tempLoc))"
<now do whatever you want with tempOffset, for example:>
[GUI] Camera - Set Camera Z Offset to <real height> - tempOffset
<and clean the location so it does not leak:>
[GUI] Custom Script: call RemoveLocation(udg_tempLoc)
<real height> does not depend on the terrain height. So <real height> = 1000 is always 1000. If your terrain height is 0, then the cam will be 1000 on top of it... If your terrain height is 1000, then the cam will be on ground level.
If you want to use it for offsets relative to the terrain, then add "-GetLocationZ(udg_tempLoc)" behind the first Custom Script.
by the way, udg_ stands for user declared global
Hope this helped. However, keep in mind that flying units arent flying at the same height all the time, either. Their flight pathes are "flattened" a bit, and as far as i know theres also a grid used for it. It may be easy to add to the code above as soon as you have some values, but currently i dont have those.
(I already had that problem with flying units once... so maybe i will work on it, but dont know)
All in all you see, this can only be used with restrictions... but its the best way i know of, and in my flight simulator it worked fine.
EDIT: Seems like i dont have the time to work on that code, sorry... If you want to use it without vJass (newGen), maybe someone will translate it for you... but as it is using a 64k 2d array, this would be annoying to translate. better use newGen