Description
Same as surfaceType, but returns texture path to ground texture as string.
Note
The texture returned is of the ground, even if there is a road at that position. To get road texture use getRoadInfo command.
Syntax
surfaceTexture [x, y, useLayerMask]
Parameters:
x: Number - world x coordinate of the positiony: Number - world y coordinate of the positionuseLayerMask: Number or Boolean - When a number is provided (Z in 3D positions), it is ignored. When a boolean is provided, it defines whether the layer mask should be used. Using the layer mask is more accurate but slightly slower. (since arma3 2.18)
Returns: String - Surface texture
Examples
Example 1
private _groundTexture = surfaceTexture getPosATL player;
Example 2
private _pos = getPosATL player;
_pos set [2, true]; // use layer mask
private _groundTexture = surfaceTexture _pos;