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

Retrieves the local or world-space rotation of a node at the current time.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getRotation "moduleName"[-ws] [-inSpaceOf string] [-preRot] [-def]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `moduleName` | string | yes | The module to get rotation for. |

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `ws` | 0 | — | inSpaceOf | Specifies that the worldspace value should be retrieved. The default is to retrieve local. |
| `inSpaceOf` | 1 | string | ws | — |
| `preRot` | 0 | — | def | — |
| `def` | 0 | — | preRot | — |

## Return value

vector 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Get the local and world space rotation of the rhumerus bone.
vector $localRot;
vector $wsRot;
 
// First the local 
$localRot = `getRotation "rhumerus"`;
 
// And then the world space
$wsRot = `getRotation "rhumerus" -ws`;
print $localRot;
print $wsRot;
```

# Additional information

## Related commands

- [getPosition](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738087)
- [getScale](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738112)