# sm.item.getShapeRotation

Gets the shape local rotation given a shape rotation index and a surface normal in local space (unit axis vector).

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.item.getShapeRotation( uuid, rotationIndex?, localNormal? )
```

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

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `uuid` | [Uuid](../Game-Script-Environment/Userdata/Uuid.md) | The shape uuid. |
| `rotationIndex` *(optional)* | integer | The rotation index to get the rotation for. (Defaults to 0) |
| `localNormal` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The local space normal the is considered to be placed on. (Defaults to positive Z axis) |

**Returns:**

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