---
tags:
    - "Socket, Ancestor, Keep, Track, Follow"
---

# Parent Constraint Translation At Rest

[Animation](../../index.md) / [Constraints](../index.md) / [Parent Constraint](index.md) / **Parent Constraint Translation At Rest**

## Description

Compares the Translation At Rest property of Parent Constraint component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Parent Constraint |  |
| Value |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.Animations;

namespace VisualScript.Runtime
{
    [Title("Parent Constraint Translation At Rest")]
    [Category("Animation/Constraints/Parent Constraint/Translation At Rest")]
    [Description("Compares the Translation At Rest property of Parent Constraint component to another value")]
    
    [Image(typeof(IconHanger), ColorTheme.Type.Pink)]
    [Keywords("Socket, Ancestor, Keep, Track, Follow")]
    
    [Parameter("Parent Constraint")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionVector3_ParentConstraint_CheckTranslationAtRest : Condition
    {
        [SerializeField] private GetGameObject m_ParentConstraint = new GetGameObject(
            new GenTypeGameObject_ParentConstraint()
        );
        
        [SerializeField] private GetVector3 m_Value = new GetVector3();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Translation At Rest");
            return $"{this.m_ParentConstraint} {member} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            ParentConstraint component = this.m_ParentConstraint.Get<ParentConstraint>(args);
            if (component == null) return false;
            
            return component.translationAtRest == (Vector3) this.m_Value.Get(args);
        }
    }
}


```

