# AgentMove record

> How an agent moves to a goal.

Namespace `EvilEngine.Api.Agents`, assembly `EvilEngine.Api`. Engine commit 4ff877b1.

```csharp
public sealed record AgentMove
```

How an [agent](/docs/api/iagent) moves to a goal.

```csharp
agent.MoveTo(target, new AgentMove { Gait = AgentMove.Run, Within = 1.2 });
```

## Members

### AgentMove (constructor)

```csharp
public AgentMove()
```

Makes a move at a walk, as near the goal as it can get.

### Walk (field)

```csharp
public const string Walk = "walk"
```

`walk`, the gait for walking.

### Run (field)

```csharp
public const string Run = "run"
```

`run`, the gait for running.

### Gait (property)

```csharp
public string Gait { get; init; }
```

The gait it moves at, `walk` unless set: the body plays the slot of that name, and the agent record's `speeds` say how fast, a number or `clip` for the moving clip's own ground speed.

### Within (property)

```csharp
public double Within { get; init; }
```

How near the goal is near enough, in metres, 0 for as near as it can get.

### Speed (property)

```csharp
public double? Speed { get; init; }
```

A speed in metres a second that beats the record's for this move, or `null`.
