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

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

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getPosition "moduleName" [-ws] [-inSpaceOf string] [-preTrans] [-default]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `nodeName` | string | yes | The node to get position 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 | The string passed in with this flag should be a module in the scene. The position returned is relative to the module passed in with this flag from the module passed into the command. |
| `preTrans` | 0 | — | default | Gets the pre-translation of the module passed in. Pre-translation can be found in the **Attributes** panel. |
| `default` | 0 | — | preTrans | This will retrieve the default position for the module passed in. The default can be viewed in the **Channels** panel by using the toolbar button with a **d**. |

## Return value

vector

## Examples

```plaintext
// Get the local and world space position 
// of the rhumerus bone.
vector $localPos;
vector $wsPos;
 
// First the local
$localPos = `getPosition "rhumerus"`; 
// And then the world space
$wsPos = `getPosition "rhumerus" -ws`;
print $localPos;
print $wsPos;
```

# Additional information

## Related commands

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