---
title: "getRotation"
canonical: "https://help.vicon.com/space/Shogun18/13668482/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

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

### Arguments

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

### Flags

| **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/Shogun18/pages/13668466)
- [getScale](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668478)