# Sandbox.PhysicsBody.AddHeightFieldShape

```csharp
PhysicsShape AddHeightFieldShape(ushort[] heights, byte[] materials, int sizeX, int sizeY, float sizeScale, float heightScale)
```

### Parameters

- `heights` (`ushort[]`)
- `materials` (`byte[]`)
- `sizeX` (`int`)
- `sizeY` (`int`)
- `sizeScale` (`float`)
- `heightScale` (`float`)

### Returns

`PhysicsShape`

Declared in [Sandbox.PhysicsBody](/api/Sandbox.PhysicsBody).
Assembly: `Sandbox.Engine`.
