From Bohemia Interactive Community
Jump to navigation
Jump to search
Hover & click on the images for description
Description
- Description:
- Returns the terrain heightmap information, as well as sea level offset (due to tides, if available).
- Groups:
- Diagnostic
Syntax
- Syntax:
- getTerrainInfo
- Return Value:
- Array - In format [landGridWidth, landGridSize, terrainGridWidth, terrainGridSize, seaLevel]:
- landGridWidth: Number - width of each land grid, in meters
- landGridSize: Number - number of land grid pixels
- terrainGridWidth: Number width of each terrain grid, in meters (also known as "cell size")
- terrainGridSize: Number - number of terrain grid pixels (also known as "heightmap resolution")
- seaLevel: Number - sea level without waves. The value is 0 if tides are disabled.
ⓘ
- The result of landGridWidth * landGridSize and terrainGridWidth * terrainGridSize is always equal to the worldSize.
- "land grid" is used by the game for object placement (e.g. finding the nearestObject), dynamic simulation, etc.
- "terrain grid" is the actual terrain, used to display the terrain, calculate terrain height, surface normal, etc.
Examples
- Example 1:
- Example 2:
-
Additional Information
- See also:
- getTerrainHeight setTerrainHeight
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here!
Add Note