Difference between revisions of "DCS func getHeight"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
(2 intermediate revisions by 2 users not shown)
Line 37: Line 37:
 
[[DCS_singleton_land|'''land functions:''']] {{listOflandFuncs}}
 
[[DCS_singleton_land|'''land functions:''']] {{listOflandFuncs}}
  
|examples= The following example with convert a vec3 point lacking y-axis data to a vec3 point at ground level.
+
|examples= The following example will convert a vec3 point lacking y-axis data to a vec3 point at ground level.
  
   newPoint= {x = point.x, y = land.getHeight({point.x, point.z}), z= point.z}
+
   newPoint= {x = point.x, y = land.getHeight({x = point.x, y = point.z}), z= point.z}
  
 
|notes=  
 
|notes=  
 
}}
 
}}
 
[[Category:Singleton Functions|getHeight]]
 
[[Category:Singleton Functions|getHeight]]
 +
[[Category:Game Patch 1.2.0|getHeight]]

Latest revision as of 06:45, 17 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: getHeight Added with: 1.2.0
Member Of: land
Syntax: number land.getHeight(table vec2 )
Description: Returns the distance from sea level (y-axis) of a given vec2 point.


Return Value: number
Return Example: 25
Examples: The following example will convert a vec3 point lacking y-axis data to a vec3 point at ground level.
 newPoint= {x = point.x, y = land.getHeight({x = point.x, y = point.z}), z= point.z}
Related Functions: land functions: getHeight, getSurfaceHeightWithSeabed, getSurfaceType, isVisible, getIP, profile, getClosestPointOnRoads, findPathOnRoads
Notes: