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...")
 
 
Line 45: Line 45:
 
}}
 
}}
 
[[Category:Singleton Functions|getSurfaceHeightWithSeabed]]
 
[[Category:Singleton Functions|getSurfaceHeightWithSeabed]]
 +
[[Category:Game Patch 2.7.7|getSurfaceHeightWithSeabed]]

Latest revision as of 06:46, 17 March 2022

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: