{"name":"surfaceTexture","title":"surfaceTexture","type":"command","url":"https://community.bistudio.com/wiki/surfaceTexture","revid":379082,"updated":"2026-09-27T08:09:04Z","groups":["Positions"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Same as surfaceType, but returns texture path to ground texture as string.\n\n> [!NOTE]\n> The texture returned is of the ground, even if there is a road at that position. To get road texture use getRoadInfo command.","syntaxes":[{"syntax":"surfaceTexture [x, y, useLayerMask]","params":[{"name":"x","type":"Number","description":"world x coordinate of the position","type_expr":"Number"},{"name":"y","type":"Number","description":"world y coordinate of the position","type_expr":"Number"},{"name":"useLayerMask","type":"Number or Boolean","description":"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.","type_expr":"Number | Boolean","since":"arma3 2.18"}],"returns":{"type":"String","type_expr":"String","description":"Surface texture"},"form":"unary","right":{"text":"[x, y, useLayerMask]"}}],"examples":[{"code":["private _groundTexture = surfaceTexture getPosATL player;"]},{"code":["private _pos = getPosATL player;\n_pos set [2, true]; // use layer mask\nprivate _groundTexture = surfaceTexture _pos;"]}],"see_also":["surfaceType","getRoadInfo"]}