Class CCDSolver2D
Component for 2D Cyclic Coordinate Descent (CCD) IK.
Inherited Members
Namespace: UnityEngine.U2D.IK
Syntax
public class CCDSolver2D : Solver2D
Properties
iterations
Get and Set the solver's itegration 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 |