> For the complete documentation index, see [llms.txt](https://docs.engagevr.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.engagevr.io/developer/afx/node-dictionary/unity/constraint.md).

# Constraint

A Constraint component links the position, rotation, or scale of a GameObject to another GameObject. For more information, refer to the [Constraints](https://docs.unity3d.com/2021.3/Documentation/Manual/Constraints.html) page in the Unity documentation.

## Constraint Add Source

Adds a Constraint source.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Transform</td><td>Transform</td><td>Reference to a transform to add as a source.</td></tr><tr><td>Weight</td><td>Float [editable]</td><td>The strength applied to the source.</td></tr><tr><td>Constraint</td><td>Constraint</td><td>The constraint to add to.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Constraint Info

Access information about a Constraint.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Constraint</td><td>Constraint</td><td>The Constraint to access information about.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Constraint Active</td><td>Boolean</td><td>True if the Constraint is active.</td></tr><tr><td>Weight</td><td>Float</td><td>The strength of the Constraint.</td></tr><tr><td>Locked</td><td>Boolean</td><td>True if the Constraint is locked.</td></tr><tr><td>Source Count</td><td>Integer</td><td>The number of sources attached to this Constraint.</td></tr></tbody></table>

## Constraint Remove Source

Removes a source from a Constraint.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Transform</td><td>Transform</td><td>Reference to the transform to remove as a source.</td></tr><tr><td>Index</td><td>Integer [editable]</td><td>The index of the source to remove.</td></tr><tr><td>Constraint</td><td>Constraint</td><td>The Constraint from which to remove the source.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Set Constraint Active

Sets whether a Constraint is active.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Constraint Active</td><td>Boolean [editable]</td><td>If true, the Constraint will be set as active. If false the Constraint will be set as inactive.</td></tr><tr><td>Constraint</td><td>Constraint</td><td>The Constraint to set active or inactive.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>
