Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

2D IK Feedback

Discussion in '2D Experimental Preview' started by Le_Magnus, Dec 12, 2020.

  1. Le_Magnus


    Jun 26, 2016

    I used the 2D IK package these last weeks and wanted to give some feeback.

    I'm not an expert about the 3D version of the Inverse Kinematics, but there seems to be a lack ok some important features for the 2D IK.

    One of them is the possibility to override IKs used by the Animator by a script.
    If I understand well, for 3D, there is the possibility to have access to an OnIKPass method or something like that, that enables IK retargeting.
    That is what I was searching for but for my 2D project. Unfortunatly that's not possible...

    In my project, I need to put some IKs target on environment's surfaces, like feet on ground, in real time.
    Here is the way I currently solve this problem for a foot IK :

    Create a second IK solver, with the same effector (same foot transform in my case) and with its own target.

    Put this 2nd IK just below the 1st in the IK Manager's hierarchy, in order to make it override the 1st one.

    Disable the 2nd IK so no override for now.

    Get a reference of this 2nd IK Solver in a script.

    Now, when I want to override the 1st IK (because foot on ground for example), I just enable the 2nd IK and modify its target to put it where I want.
    I need to not forget to disable it when no override is needed.

    When you need to override spines, legs, arms and other IKs like me, it's becoming kind of a tedious process.
    So my question goes to the Unity dev team : Are you planning to implement some new features (like some of the 3D version) to improve 2D IK usage ?

    Hope my english was good enough to correctly understand the "problem".

    Have a nice day

    Unity Version : 2020.2.0b14
    2D Animation : 5.0.3
    2D IK : 3.0.2