Class FabrikSolver2D
Component responsible for 2D Forward And Backward Reaching Inverse Kinematics (FABRIK) IK.
Inherited Members
Namespace: UnityEngine .U2D.IK
Assembly: Unity.2D.IK.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Experimental.U2D.IK")]
[Solver2DMenu("Chain (FABRIK)")]
[Icon("Packages/com.unity.2d.animation/Editor/Assets/ComponentIcons/Animation.IKFabrik.png")]
public sealed class FabrikSolver2D : Solver2D
Properties
iterations
Get and set the solver's integration count.
Declaration
public int iterations { get; set; }
Property Value
Type | Description |
---|---|
int |
tolerance
Get and set target distance tolerance.
Declaration
public float tolerance { get; set; }
Property Value
Type | Description |
---|---|
float |
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
Overrides
GetChain(int)
Gets the chain in the solver at index.
Declaration
public override IKChain2D GetChain(int index)
Parameters
Type | Name | Description |
---|---|---|
int | 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 |
---|---|
int | Returns 1, because FABRIK Solver has only one chain. |