# Sandbox.ModelBuilder.WithLodDistance

```csharp
ModelBuilder WithLodDistance(int lod, float distance)
```

Sets the distance at which an LOD level becomes active.
By default, each level switches at `lod * 50`.

### Parameters

- `lod` (`int`): The LOD level, from 0 to 7.
- `distance` (`float`): The switch distance.

### Returns

`ModelBuilder`

### Exceptions

- `System.ArgumentOutOfRangeException`: The LOD level is outside the range 0 to 7.

Declared in [Sandbox.ModelBuilder](/api/Sandbox.ModelBuilder).
Assembly: `Sandbox.Engine`.
