# Unit.setMovementDirection

Sets the movement direction for a unit

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
unit:setMovementDirection( direction )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Unit.md#setmovementdirection)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `unit` | [Unit](../Game-Script-Environment/Userdata/Unit.md) | The unit. |
| `direction` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The desired movement direction. |
