---
name: "surfaceTexture"
type: command
status: ok
groups: ["Positions"]
arma3_since: "2.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/surfaceTexture
revid: 379082
updated: 2026-09-27T08:09:04Z
---

# surfaceTexture

*Command · Positions · Arma 3 v2.00*

## Description

Same as [surfaceType](../commands/surfaceType.md), 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](../commands/getRoadInfo.md) command.

## Syntax

```sqf
surfaceTexture [x, y, useLayerMask]
```

**Parameters:**

- `x`: [Number](../topics/Number.md) - world x coordinate of the position
- `y`: [Number](../topics/Number.md) - world y coordinate of the position
- `useLayerMask`: [Number](../topics/Number.md) or [Boolean](../topics/Boolean.md) - 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](../topics/String.md) - Surface texture

## Examples

### Example 1

```sqf
private _groundTexture = surfaceTexture getPosATL player;
```

### Example 2

```sqf
private _pos = getPosATL player;
_pos set [2, true]; // use layer mask
private _groundTexture = surfaceTexture _pos;
```

## See also

[surfaceType](../commands/surfaceType.md) · [getRoadInfo](../commands/getRoadInfo.md)

<sub>Source: [BI Community Wiki — surfaceTexture](https://community.bistudio.com/wiki/surfaceTexture) (revision 379082).</sub>
