---
title: "getConstraintOffset"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737192/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

> Macro (scroll-tablelayout)

|  |
| --- |
| `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. |

## 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/ShogunPost121/pages/1253736642)
- [getConstraintPos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738511)
- [setConstraint](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737004)
- [snapToConstraint](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736474)
- [solve](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736571)