{"name":"surfaceTexture","operator":null,"title":"surfaceTexture","type":"command","url":"https://community.bistudio.com/wiki/surfaceTexture","revid":379082,"updated":"2026-09-27T08:09:04Z","groups":["Positions"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.00"}],"since":{"game":"arma3","name":"Arma 3","version":"2.00"},"arma3_since":"2.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"x","type":"Number","optional":false,"default":null,"description":"world x coordinate of the position","types":["Number"],"since":null,"text":"x: Number - world x coordinate of the position"},{"name":"y","type":"Number","optional":false,"default":null,"description":"world y coordinate of the position","types":["Number"],"since":null,"text":"y: Number - world y coordinate of the position"},{"name":"useLayerMask","type":"Number or Boolean","optional":false,"default":null,"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.","types":["Number","Boolean"],"since":"arma3 2.18","text":"useLayerMask: 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."}],"returns":{"type":"String","types":["String"],"description":"Surface texture","text":"String - Surface texture"},"form":"unary","operator":null,"left":null,"right":{"text":"[x, y, useLayerMask]","types":["Array"]}}],"examples":[{"text":"```sqf\nprivate _groundTexture = surfaceTexture getPosATL player;\n```","code":["private _groundTexture = surfaceTexture getPosATL player;"]},{"text":"```sqf\nprivate _pos = getPosATL player;\n_pos set [2, true]; // use layer mask\nprivate _groundTexture = surfaceTexture _pos;\n```","code":["private _pos = getPosATL player;\n_pos set [2, true]; // use layer mask\nprivate _groundTexture = surfaceTexture _pos;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["surfaceType","getRoadInfo"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Positions","Introduced with Arma 3 version 2.00","Scripting Commands"]}