# sm.localPlayer.setDirection

Sets the direction of where the player is viewing or aiming. Intended to be used when the controls have been locked. (See [sm.localPlayer.setLockedControls](../Game-Script-Environment/Static-Functions/sm.localPlayer.md#setlockedcontrols))

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.localPlayer.setDirection( direction )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.localPlayer.md#setdirection)

**Availability:** Client only

**Parameters:**

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