Difference between revisions of "DCS func getSurfaceHeightWithSeabed"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= getSurfaceHeightWithSeabed |vNum= 2.7.7 |par1= land |par2= |par3= |par4= |desc= Returns the surface height and dep...")
(No difference)

Revision as of 23:33, 20 October 2021

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: