Class ConstraintsUtils | Animation Rigging | 1.0.3
docs.unity3d.com
    Show / Hide Table of Contents

    Class ConstraintsUtils

    Utility functions for constraints.

    Inheritance
    Object
    ConstraintsUtils
    Namespace: UnityEngine.Animations.Rigging
    Syntax
    public static class ConstraintsUtils

    Methods

    ExtractChain(Transform, Transform)

    Creates a list of Transforms all parented to one another in between two GameObjects.

    Declaration
    public static Transform[] ExtractChain(Transform root, Transform tip)
    Parameters
    Type Name Description
    Transform root

    The root Transform.

    Transform tip

    The tip Transform.

    Returns
    Type Description
    Transform[]

    ExtractLengths(Transform[])

    Calculates the distances in between every Transforms in the specified Transform chain.

    Declaration
    public static float[] ExtractLengths(Transform[] chain)
    Parameters
    Type Name Description
    Transform[] chain

    The Transform chain.

    Returns
    Type Description
    Single[]

    An array of distances.

    ExtractSteps(Transform[])

    Calculates the interpolant values for each Transform using distance as a measure such that first Transform is at 0 and last Transform is at 1.

    Declaration
    public static float[] ExtractSteps(Transform[] chain)
    Parameters
    Type Name Description
    Transform[] chain

    The Transform chain.

    Returns
    Type Description
    Single[]

    An array of interpolants.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023