Class CCDSolver2D
Component for 2D Cyclic Coordinate Descent (CCD) IK.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType(System.Type, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsByType(System.Type, UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindFirstObjectByType(System.Type)
UnityEngine.Object.FindAnyObjectByType(System.Type)
UnityEngine.Object.FindFirstObjectByType(System.Type, UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType(System.Type, UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.U2D.IK
Syntax
[MovedFrom("UnityEngine.Experimental.U2D.IK")]
[Solver2DMenu("Chain (CCD)")]
[Icon("Packages/com.unity.2d.animation/Editor/Assets/ComponentIcons/Animation.IKCCD.png")]
public sealed class CCDSolver2D : Solver2D, IPreviewable
Properties
iterations
Get and Set the solver's integration count.
Declaration
public int iterations { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
tolerance
Get and Set target distance tolerance.
Declaration
public float tolerance { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
velocity
Get and Set the solver velocity.
Declaration
public float velocity { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
Methods
DoPrepare()
DoPrepare override from base class.
Declaration
protected override void DoPrepare()
Overrides
DoUpdateIK(List<Vector3>)
DoUpdateIK override from base class.
Declaration
protected override void DoUpdateIK(List<Vector3> effectorPositions)
Parameters
| Type | Name | Description |
|---|---|---|
| List<Vector3> | effectorPositions | Target position for the chain. |
Overrides
GetChain(Int32)
Gets the chain in the solver by index.
Declaration
public override IKChain2D GetChain(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | Chain index. |
Returns
| Type | Description |
|---|---|
| IKChain2D | Returns IKChain2D at the index. |
Overrides
GetChainCount()
Returns the number of chain in the solver.
Declaration
protected override int GetChainCount()
Returns
| Type | Description |
|---|---|
| Int32 | This always returns 1 |