Position: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (pic wip) |
Killzone Kid (talk | contribs) (content) |
||
Line 1: | Line 1: | ||
==Introduction== | |||
''' | Positions in Arma could be either '''2D''', in which case it is in format '''[x,y]''', where '''x''' is the coordinate on the ''South'' – ''North'' axis and '''y''' is the coordinate on ''West'' – ''East'' axis, or '''3D''', in which case it is in format '''[x,y,z]''', where '''z''' is the height. The height relative to exactly what differs depending on the format of '''3D''' position used. | ||
==Formats== | |||
:There are a number of formats available in the game: | |||
''' | :* '''ASL''' – Presumably “'''A'''t/'''A'''bove '''S'''ea '''L'''evel” | ||
:* '''ATL''' – Presumably “'''A'''t/'''A'''bove '''T'''errain '''L'''evel” | |||
:* '''ASLW''' – Presumably “'''A'''t/'''A'''bove '''S'''ea '''L'''evel inc. '''W'''aves” | |||
:* '''AGL''' – Presumably “'''A'''t/'''A'''bove '''G'''eneric/'''G'''round '''L'''evel” | |||
:* '''AGLS''' – Presumably “'''A'''t/'''A'''bove '''G'''eneric/'''G'''round '''L'''evel inc. '''S'''urfaces” | |||
:* '''World''' – Raw world coordinate system | |||
:* '''Relative''' – Position relative to an object | |||
:* '''Config''' – Position used in configs | |||
:The following diagram illustrates some of the most used formats: | |||
:[[Image:position.jpg|600px]] | |||
==PositionASL== | |||
''' | :'''z''' is measured from the sea level which is constant across the map. | ||
:<u>Related commands</u>: | |||
:[[getPosASL]], [[setPosASL]], [[getPosASLVisual]], [[ASLToATL]], [[ATLToASL]], [[AGLToASL]], [[ASLToAGL]], [[eyePos]], [[aimPos]], [[getTerrainHeightASL]], [[lineIntersects]], [[lineIntersectsWith]], [[lineIntersectsObjs]], [[terrainIntersectASL]], [[playSound3D]], [[setDefaultCamera]] | |||
[[Category: | ==PositionASLW== | ||
:'''z''' is measured from the surface of the sea that could be higher or lower than sea level due to waves. | |||
:<u>Related commands</u>: | |||
:[[getPosASLW]], [[setPosASLW]] | |||
==PositionATL== | |||
:'''z''' is measured from the terrain level which varies across the map. | |||
:<u>Related commands</u>: | |||
:[[getPosATL]], [[setPosATL]], [[getPosATLVisual]], [[ASLToATL]], [[ATLToASL]] | |||
==PositionAGL== | |||
:'''z''' is the same as in [[PositionASLW]] when over sea and is the same as in [[PositionATL]] when over land. Most commands either take or return [[PositionAGL]]. | |||
:<u>Related commands</u>: | |||
:[[modelToWorld]], [[worldToModel]], [[modelToWorldVisual]], [[worldToModelVisual]], [[positionCameraToWorld]], [[terrainIntersect]], [[isOnRoad]], [[drawIcon3D]], [[drawLine3D]], [[distance]], [[moveTo]], [[doMove]], [[move]], [[setDestination]], [[buildingPos]], [[screenToWorld]], [[worldToScreen]], [[AGLToASL]], [[ASLToAGL]] | |||
==PositionAGLS== | |||
:Over land, '''z''' is measured as height over terrain level minus the height of surface over terrain level underneath. If such surface exists and is counted in, the resulting '''z''' becomes 0. The following diagram illustrates how '''z''' is obtained for a soldier standing on a rock: | |||
:[[Image:z.jpg|600px]] | |||
:Over sea it gets even more complicated as instead of [[PositionATL]], [[PositionASLW]] is used minus the offset for the surface height, presumably over waves too, as '''z''' seems static. As there is currently no way to obtain '''H''' of the surface, it becomes impossible to convert given [[PositionAGLS]] into other formats, unlike with other position formats. | |||
:<u>Related commands</u>: | |||
:[[position]], [[visiblePosition]], [[getPos]], [[getPosVisual]] | |||
==PositionWorld== | |||
:Similar to [[PositionASL]], however '''z''' is measured from the sea level to the the model centre [0,0,0] of an object, rather than transformed [[boundingCenter]] or land contact vertices. | |||
:<u>Related commands</u>: | |||
:[[getPosWorld]], [[setPosWorld]], [[mapCenterOnCamera]] | |||
==PositionRelative== | |||
:Relative position is normally an [x,y,z] offset from the model centre. | |||
:<u>Related commands</u>: | |||
:[[positionCameraToWorld]], [[selectionPosition]], [[modelToWorld]], [[worldToModel]], [[modelToWorldVisual]], [[worldToModelVisual]], [[camPrepareRelPos]], [[camSetRelPos]] | |||
==PositionConfig== | |||
:The format used in configs, such as ''mission.sqm'', is '''[x,z,y]''', where '''z''' and '''y''' are swapped around. One other command that uses this format is [[positionCameraToWorld]]. '''z''' in configs is measured from the sea level. | |||
[[Category:Render Time Scope Scripting Commands]] |
Revision as of 14:31, 13 August 2015
Introduction
Positions in Arma could be either 2D, in which case it is in format [x,y], where x is the coordinate on the South – North axis and y is the coordinate on West – East axis, or 3D, in which case it is in format [x,y,z], where z is the height. The height relative to exactly what differs depending on the format of 3D position used.
Formats
- There are a number of formats available in the game:
- ASL – Presumably “At/Above Sea Level”
- ATL – Presumably “At/Above Terrain Level”
- ASLW – Presumably “At/Above Sea Level inc. Waves”
- AGL – Presumably “At/Above Generic/Ground Level”
- AGLS – Presumably “At/Above Generic/Ground Level inc. Surfaces”
- World – Raw world coordinate system
- Relative – Position relative to an object
- Config – Position used in configs
- The following diagram illustrates some of the most used formats:
PositionASL
- z is measured from the sea level which is constant across the map.
- Related commands:
- getPosASL, setPosASL, getPosASLVisual, ASLToATL, ATLToASL, AGLToASL, ASLToAGL, eyePos, aimPos, getTerrainHeightASL, lineIntersects, lineIntersectsWith, lineIntersectsObjs, terrainIntersectASL, playSound3D, setDefaultCamera
PositionASLW
- z is measured from the surface of the sea that could be higher or lower than sea level due to waves.
- Related commands:
PositionATL
- z is measured from the terrain level which varies across the map.
- Related commands:
PositionAGL
- z is the same as in PositionASLW when over sea and is the same as in PositionATL when over land. Most commands either take or return PositionAGL.
- Related commands:
- modelToWorld, worldToModel, modelToWorldVisual, worldToModelVisual, positionCameraToWorld, terrainIntersect, isOnRoad, drawIcon3D, drawLine3D, distance, moveTo, doMove, move, setDestination, buildingPos, screenToWorld, worldToScreen, AGLToASL, ASLToAGL
PositionAGLS
- Over land, z is measured as height over terrain level minus the height of surface over terrain level underneath. If such surface exists and is counted in, the resulting z becomes 0. The following diagram illustrates how z is obtained for a soldier standing on a rock:
- Over sea it gets even more complicated as instead of PositionATL, PositionASLW is used minus the offset for the surface height, presumably over waves too, as z seems static. As there is currently no way to obtain H of the surface, it becomes impossible to convert given PositionAGLS into other formats, unlike with other position formats.
- Related commands:
PositionWorld
- Similar to PositionASL, however z is measured from the sea level to the the model centre [0,0,0] of an object, rather than transformed boundingCenter or land contact vertices.
- Related commands:
PositionRelative
- Relative position is normally an [x,y,z] offset from the model centre.
- Related commands:
- positionCameraToWorld, selectionPosition, modelToWorld, worldToModel, modelToWorldVisual, worldToModelVisual, camPrepareRelPos, camSetRelPos
PositionConfig
- The format used in configs, such as mission.sqm, is [x,z,y], where z and y are swapped around. One other command that uses this format is positionCameraToWorld. z in configs is measured from the sea level.