# sm.quat.lookRotation

Create a new quaternion from direction vectors. DEPRECATED

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
sm.quat.lookRotation( at, up )
```

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

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `at` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The forward vector. |
| `up` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The up vector. |

**Returns:**

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

## Terrain

``` { .lua .api-signature }
sm.quat.lookRotation( at, up )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.quat.md#lookrotation)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `at` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The forward vector. |
| `up` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The up vector. |

**Returns:**

| Type | Description |
| --- | --- |
| [Quat](../Terrain-Script-Environment/Userdata/Quat.md) | The quaternion. |
