I have posted before about this and didnt realy recieve any info.
I have been trying to use the Get Terrain Ground Height statement in order to receive the height and a specific point located, for a simple example, under the camera.
I first Load the Terrain which is a DBO format terrain, then get the height using X and Z camera coords. The value returned is always 0.
I have been told that this command only support DBT (Darkbasic Terrain) formats, but have browzed the web for weeks and have found no format of the sort or any converter.
Can anyone else shed some light on this, here is the basic snippet.
Load Terrain "Media/Maps/MapHome.dbo", 1
Position Camera 0, 100, 0
Backdrop On
Autocam Off
Do
`Get Camera Position X Y and Z
CPx = Camera Position X()
CPy = Camera Position Y()
CPz = Camera Position Z()
`Get Ground Height at Camera Position
GTGH = Get Terrain Ground Height(1, CPx, CPz)
`Get MouseMovement
MMx = MouseMoveX()
MMy = MouseMoveY()
`Get Camera Angle
CAx = Camera Angle X()
CAy = Camera Angle Y()
`Cameraa Angle+MouseMovement
CRx = CAx+MMy
CRy = CAy+MMx
`Change Camera Angle
XRotate Camera CRx
YRotate Camera CRy
`Move Camera
If KEYSTATE(17) = 1 Then Move Camera 2
If KEYSTATE(31) = 1 Then Move Camera -2
`Print Camera Position X and Z
Print "Camera Posx",CPx
Print "Camera Posz",CPz
`Print Ground Height at Camera Position
Print "Ground Height",GTGH
Sync
Loop
I am assuming that the DBT format someone was talking about is an internaly used but not commonly used format with no software available to create or edit these specific map types with. If there is no way of attaining the ground height... how is it best way to attain ground height on a DBO map (which is im guessing just seen as an object in DBPro).