docs.unity3d.com
    Show / Hide Table of Contents

    Class CCD2D

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

    Inheritance
    Object
    CCD2D
    Namespace: UnityEngine.U2D.IK
    Syntax
    public static class CCD2D : object

    Methods

    Solve(Vector3, Vector3, Int32, Single, Single, 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.

    Int32 solverLimit

    Solver iteration count.

    Single tolerance

    Target position's tolerance.

    Single velocity

    Velocity towards target position.

    Vector3[] positions

    Chain positions.

    Returns
    Type Description
    Boolean

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

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023