Class ConstraintsUtils
Utility functions for constraints.
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. |