---
title: "getConstraintOffset"
canonical: "https://help.vicon.com/space/Shogun112/31230028/getConstraintOffset"
format: markdown
---
# Description

The getConstraintOffset command gets the local constraint offset for the specified node. Used often during fine-tuning the setup of a skeleton to adjust the relationship between markers and bones.

## Functional area

Data retrieval

# Command syntax

## Syntax

|  |
| --- |
| `getConstraintOffset "constraintName"[-ws]` |

### Arguments

> Macro (scroll-tablelayout)

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `constraintName` | string | yes | The name of the constraint whose offset is requested |

### Flags

> Macro (scroll-tablelayout)

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `ws` | 0 | — | — | Return the world space offset instead of the local space offset. |

> Macro (scroll-pagebreak)

## Return value

vector

## Examples

```plaintext
// Get the world space position of the Constraint offset for the 
// constraint LFHD_Head and print to the log. 
vector $targetPos = `getConstraintOffset "LFHD_Head" -ws`; 
print $targetPos;
```

# Additional information

## Related commands

- [createSkelScript](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31230473)
- [getConstraintPos](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31239578)
- [setConstraint](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31232057)
- [snapToConstraint](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31229317)
- [solve](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31231226)