---
title: "setRotation"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737306/setRotation"
format: markdown
---
# Description

Use setRotation to set the rotation of a module in relative or world space coordinates.

setRotation modifies the keys of the current frame. If no animation data exists when setRotation is run, it creates a key.

## Functional area

Data manipulators

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `setRotation "moduleName" rotVec[-ws] [-preRot] [-def]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `rotVec` |  |  | The vector data to apply |
| `moduleName` |  |  | Name of the module you want to modify |

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `ws` | 0 | — | — | RotVec data is applied in world space coordinates |
| `preRot` | 0 | — | def | — |
| `def` | 0 | — | preRot | — |

## Return value

void 

> Macro (scroll-pagebreak)

## Examples

```plaintext
//Create a marker and set its rotation
create Marker "R_UpperArm"; 
setRotation R_UpperArm <<100, 0, 0>>;
```

# Additional information

## Related commands

- [setKey](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737949)
- [setPosition](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737651)
- [setScale](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736896)