docs.unity3d.com
    Show / Hide Table of Contents

    Class FABRIK2D

    Utility for 2D Forward And Backward Reaching Inverse Kinematics (FABRIK) IK Solver.

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

    Methods

    Solve(Vector2, Int32, Single, Single[], ref Vector2[])

    Solve IK based on FABRIK

    Declaration
    public static bool Solve(Vector2 targetPosition, int solverLimit, float tolerance, float[] lengths, ref Vector2[] positions)
    Parameters
    Type Name Description
    Vector2 targetPosition

    Target position.

    Int32 solverLimit

    Solver iteration count.

    Single tolerance

    Target position's tolerance.

    Single[] lengths

    Length of the chains.

    Vector2[] positions

    Chain positions.

    Returns
    Type Description
    Boolean

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

    SolveChain(Int32, ref FABRIKChain2D[])

    Solve IK based on FABRIK.

    Declaration
    public static bool SolveChain(int solverLimit, ref FABRIKChain2D[] chains)
    Parameters
    Type Name Description
    Int32 solverLimit

    Solver iteration count.

    UnityEngine.U2D.IK.FABRIKChain2D[] chains

    FABRIK chains.

    Returns
    Type Description
    Boolean

    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