# AiState.getFacingDirection

Returns the state's facing direction.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
aiState:getFacingDirection(  )
```

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

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `state` | [AiState](../Game-Script-Environment/Userdata/AiState.md) | The state. |

**Returns:**

| Type | Description |
| --- | --- |
| [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The direction. |
