docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CCD2D

    Utility for 2D based Cyclic Coordinate Descent (CCD) IK Solver.

    Inheritance
    object
    CCD2D
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.U2D.IK
    Assembly: Unity.2D.IK.Runtime.dll
    Syntax
    [MovedFrom("UnityEngine.Experimental.U2D.IK")]
    [BurstCompile]
    public static class CCD2D

    Methods

    Solve(in float2, int, float, float, ref NativeArray<float2>)

    Solve IK Chain based on CCD for 2D positions.

    Declaration
    [BurstCompile]
    public static bool Solve(in float2 targetPosition, int solverLimit, float tolerance, float velocity, ref NativeArray<float2> positions)
    Parameters
    Type Name Description
    float2 targetPosition

    Target position in 2D.

    int solverLimit

    Solver iteration count.

    float tolerance

    Target position's tolerance.

    float velocity

    Velocity towards target position.

    NativeArray<float2> positions

    Chain positions in 2D.

    Returns
    Type Description
    bool

    Returns true if solver successfully completes within iteration limit. False otherwise.

    Solve(Vector3, Vector3, int, float, float, ref Vector3[])

    Solve IK Chain based on CCD.

    Declaration
    [Obsolete("Use CCD2D.Solve(in float2 targetPosition, int solverLimit, float tolerance, float velocity, ref NativeArray<float2> positions) instead.")]
    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)