# Positions (scripting commands)

- [AGLToASL](../../commands/AGLToASL.md): Converts position from PositionAGL to PositionASL.
- [aimPos](../../commands/aimPos.md): Returns the position of the object other units can aim to.
- [ASLToAGL](../../commands/ASLToAGL.md): Converts position from PositionASL to PositionAGL
- [ASLToATL](../../commands/ASLToATL.md): Converts a position from PositionASL to PositionATL
- [ATLToASL](../../commands/ATLToASL.md): Converts a position from PositionATL to PositionASL
- [buildingPos](../../commands/buildingPos.md): Returns position of a given indexed position in a building.
- [eyePos](../../commands/eyePos.md): Returns the object's eyes / main turret position.
- [findEmptyPosition](../../commands/findEmptyPosition.md): Searches for an empty area around the specified position, starting from the *center* looking for an empty *areaRadius* and looks as far away as *areaRadius* + *maxDistance*.
- [findEmptyPositionReady](../../commands/findEmptyPositionReady.md): Preloads area to be used with findEmptyPosition command and returns true when area is ready. The size of the area preloaded is from `center - radius - maxDistance` to `center + radius + maxDistance`
- [formationPosition](../../commands/formationPosition.md): Return position of unit in the formation.
- [getPos](../../commands/getPos.md): Returns object or location position. If the argument is an object, the return value is in format PositionAGLS.
- [getPosASL](../../commands/getPosASL.md): Returns the object position height above sea level.
- [getPosASLW](../../commands/getPosASLW.md): Returns the object position height above water surface (waves and pond objects included).
- [getPosATL](../../commands/getPosATL.md): Returns the position of an object relative to the terrain.
- [getPosWorld](../../commands/getPosWorld.md): Returns the provided object's model centre position ([0,0,0]) in PositionASL, rather than the transformed boundingCenter or LandContact vertices.
- [getRelPos](../../commands/getRelPos.md): Returns position that is given distance and relative direction away from original object. The alternative syntax available from Arma 3 v 2.14, returns the position offset of the attached object.
- [getTerrainHeight](../../commands/getTerrainHeight.md): Returns terrain height at the specified location.
- [getTerrainHeightASL](../../commands/getTerrainHeightASL.md): Returns the terrain height above the sea for the given position.
- [getTerrainInfo](../../commands/getTerrainInfo.md): Returns the terrain heightmap information, as well as sea level offset (due to tides, if available).
- [inArea](../../commands/inArea.md): Checks whether given position or object is inside given area. Use inAreaArray to check multiple positions/objects within area.
- [inAreaArray](../../commands/inAreaArray.md): Returns given list of Objects and/or Positions that are in the given area, area defined by a trigger, marker, location or array.
- [inAreaArrayIndexes](../../commands/inAreaArrayIndexes.md): Returns indices of positions that are within the provided area.
- [inPolygon](../../commands/inPolygon.md): Checks whether position is inside given polygon. The polygon is only checked in 2 dimensions, i.e. the value of Z is ignored.
- [isFlatEmpty](../../commands/isFlatEmpty.md): Checks given position against given filter params. Filter includes checks for: - If there are any objects closer than given distance from given position (in 2D) - If the area around position is flat enough to match…
- [mapGridPosition](../../commands/mapGridPosition.md): Returns the map grid position of an object or position.
- [modelToWorld](../../commands/modelToWorld.md): Translates relative position from object model space to world space in PositionAGL format.
- [modelToWorldWorld](../../commands/modelToWorldWorld.md): Converts position from object model space to world space in PositionASL format from the object's centre position.
- [position](../../commands/position.md): Returns position of an object (alias of getPos) or location (alias of locationPosition).
- [positionCameraToWorld](../../commands/positionCameraToWorld.md): Get the world coordinate space (AGL) from a camera-relative position.
- [posScreenToWorld](../../commands/posScreenToWorld.md): Converts map screen coordinates into world coordinates. Unlike ctrlMapScreenToWorld, this command returns world position is format [x, y, 0], otherwise it is identical to it.
- [posWorldToScreen](../../commands/posWorldToScreen.md): Converts world coordinates into map screen coordinates. This command is identical to ctrlMapWorldToScreen.
- [screenToWorld](../../commands/screenToWorld.md): Returns the position on landscape (PositionAGL) corresponding to the given point on screen (in UI coordinates).
- [screenToWorldDirection](../../commands/screenToWorldDirection.md): Returns the 3D vector in world corresponding to the given point on the screen (in UI coordinates), as if the vector was aiming from the camera to the screen position.
- [setPos](../../commands/setPos.md): Sets object position to format PositionAGLS (over surface). The Z value is used to calculate the nearest surface below the provided position. If the surface is close, it uses the Z position of the surface.
- [setPosASL](../../commands/setPosASL.md): Sets the object position above sea level. Given position must be in PositionASL format.
- [setPosASL2](../../commands/setPosASL2.md) **[broken]**: Sets the object position. The pos array uses the PositionASL format. The version of the command does not offset based on object center.
- [setPosASLW](../../commands/setPosASLW.md): Sets the object position above sea surface. The pos array uses the PositionASLW format.
- [setPosATL](../../commands/setPosATL.md): Sets the position of an object relative to the terrain.
- [setPosWorld](../../commands/setPosWorld.md): Sets position of an object based on the model's centre position (see getPosWorld).
- [setTerrainHeight](../../commands/setTerrainHeight.md): Set the current terrain's altitude on provided location(s).
- [setVehiclePosition](../../commands/setVehiclePosition.md): Moves the object to a given position (same as createVehicle placement algorithm). Uses either the position that's defined by the *position* param, or one of the marker positions from the markers array.
- [surfaceIsWater](../../commands/surfaceIsWater.md): Returns whether there is water at given position. In Arma 3, it also detects pond objects, but only if they are loaded in memory (normally only true if the objects are within the object view distance)
- [surfaceNormal](../../commands/surfaceNormal.md): Returns terrain's surface normal) on given position.
- [surfaceTexture](../../commands/surfaceTexture.md): Same as surfaceType, but returns texture path to ground texture as string.
- [surfaceType](../../commands/surfaceType.md): Returns what surface type is at the given position. For surface texture see surfaceTexture command.
- [unitAimPosition](../../commands/unitAimPosition.md): Returns the position on the unit other units can aim at. Same as aimPos only returns position in PositionAGL format and has render scope alternative unitAimPositionVisual.
- [unitsBelowHeight](../../commands/unitsBelowHeight.md): Returns units in group/array below given Above Terrain Level (ATL) altitude.
- [visiblePosition](../../commands/visiblePosition.md): Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual.
- [visiblePositionASL](../../commands/visiblePositionASL.md): Returns an object's rendered ASL position (z value above sea level) in render time scope.
- [worldToModel](../../commands/worldToModel.md): Converts position from world space to object model space.
- [worldToModelVisual](../../commands/worldToModelVisual.md): Converts position from world space to object model space in render time scope.
- [worldToScreen](../../commands/worldToScreen.md): Converts position in world space into screen (UI) space. If a specified position is not within the current screen view, an empty array is returned.
