Class CCD2D
Utility for 2D based Cyclic Coordinate Descent (CCD) IK Solver.
Inherited Members
Namespace: UnityEngine.U2D.IK
Assembly: Unity.2D.IK.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Experimental.U2D.IK")]
public static class CCD2D
Methods
Solve(Vector3, Vector3, int, float, float, ref Vector3[])
Solve IK Chain based on CCD.
Declaration
public static bool Solve(Vector3 targetPosition, Vector3 forward, int solverLimit, float tolerance, float velocity, ref Vector3[] positions)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | targetPosition | Target position. |
Vector3 | forward | Forward vector for solver. |
int | solverLimit | Solver iteration count. |
float | tolerance | Target position's tolerance. |
float | velocity | Velocity towards target position. |
Vector3[] | positions | Chain positions. |
Returns
Type | Description |
---|---|
bool | Returns true if solver successfully completes within iteration limit. False otherwise. |