Class CCDSolver2D
Component responsible for 2D Cyclic Coordinate Descent (CCD) IK.
Inherited Members
Namespace: UnityEngine.U2D.IK
Syntax
[MovedFrom("UnityEngine.Experimental.U2D.IK")]
[Solver2DMenu("Chain (CCD)")]
public class CCDSolver2D : Solver2D
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()
Prepares the data required for updating the solver.
Declaration
protected override void DoPrepare()
Overrides
DoUpdateIK(List<Vector3>)
Updates the IK and sets the chain's transform positions.
Declaration
protected override void DoUpdateIK(List<Vector3> targetPositions)
Parameters
Type | Name | Description |
---|---|---|
List<Vector3> | targetPositions | Target positions for the chain. |
Overrides
GetChain(Int32)
Gets the chain in the solver at index.
Declaration
public override IKChain2D GetChain(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index to query. Not used in this override. |
Returns
Type | Description |
---|---|
IKChain2D | Returns IKChain2D for the Solver. |
Overrides
GetChainCount()
Returns the number of chains in the solver.
Declaration
protected override int GetChainCount()
Returns
Type | Description |
---|---|
Int32 | Returns 1, because CCD Solver has only one chain. |