DCS func getSurfaceHeightWithSeabed

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: getSurfaceHeightWithSeabed Added with: 2.7.7
Member Of: land
Syntax: number, number land.getSurfaceHeightWithSeabed(table vec2 )
Description: Returns the surface height and depth of a point. Useful for checking if the path is deep enough to support a given ship. Both values are positive. When checked over water at sea level the first value is always zero. When checked over water at altitude, for example the reservoir of the Inguri Dam, the first value is the corresponding altitude the water level is at.


Return Value: number, number
Return Example: 0, 15
Examples: The following will return a value of the depth at a trigger zone named thors twins.
 local p = trigger.action.getZone("thors twins").point
 local alt, depth = land.getSurfaceHeightWithSeabed({x = p.x, y = p.z})
Related Functions: land functions: getHeight, getSurfaceHeightWithSeabed, getSurfaceType, isVisible, getIP, profile, getClosestPointOnRoads, findPathOnRoads
Notes: