Search Unity

Animation Rigging 2019.2 -Two-Bone IK not reaching nearby target with all Weights at 1

Discussion in 'Animation Rigging' started by dwilson_magic, Apr 10, 2020.

  1. dwilson_magic

    dwilson_magic

    Joined:
    Jul 24, 2018
    Posts:
    3
    First, thank you for such an improved animation rigging system! It's modularity and multi-thread nature are absolutely fantastic. Thank you for making it a regular part of the Unity engine.

    Here is the situation I'm working with currently.
    TwoBone-NotAligningToTarget.jpg
    I have an animated character grabbing another animated prop (Boat handle). We are trying to maintain a solid contact. Without an IK solution the keyframe reduction creates "swim-y" animation with a lot of issues.

    I've created a Two-Bone IK on the LeftArm in an attempt to anchor the hand-to-boat contact. The LeftArm_IKTarget is within the character rig. There is a standard Parenting component on the LeftArm_IKTarget that refers to a target Game Object within the Boat rig.
    HierarchyView.jpg LeftArmIK-Setup.jpg LeftArmIKTarget_Parent_Setup.jpg
    The constraints function as expected, turning of and on with the weight floats - except the arm joints start to drift away from the LeftArm_IKTarget even though the IK Box Effector continues to align with the cube on the boat handle.
    IKTarget and Joints not aligned.jpg
    What might be the reasons that the IK joints would wander away from their target?
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    At a glance, I think the issue might be introduced by using "Parent Constraint" on the IK target. Parent Constraint is not part of the Animation Rigging constraints and evaluates separately, which might explain why your IK is slipping.

    Instead, try out "MultiParent Constraint" which is an Animation Rigging constraint.
     
    dwilson_magic likes this.
  3. dwilson_magic

    dwilson_magic

    Joined:
    Jul 24, 2018
    Posts:
    3
    Thanks Simon for the eyes on the issue. I rebuilt the constraints with only Anim Rigging components. Here is the result. upload_2020-4-14_17-17-3.png
    The position of joint doesn't match the IK target effector, and the IK target effector doesn't match the multi-parent constraint target. Hmmm.
    The component set-up is as follows (this is the GameObject paused while running it in Editor).
    upload_2020-4-14_17-23-13.png
    And here's the Heirarchy view.
    upload_2020-4-14_17-26-3.png

    Any thoughts on the update?
     
  4. dwilson_magic

    dwilson_magic

    Joined:
    Jul 24, 2018
    Posts:
    3
    Using the generic Parent component solidly connected the effector IKArmTarget object to the separate BoatTarget game object. The effector's position and rotation stayed together, but only the joints strayed.

    Using the Multi-Parent component BELOW the Two Bone component, did not produce a clean result.

    Placing the Multi-Parent component ABOVE the Two Bone component, allowed it to function properly, but both the effector and the joints strayed.
     
  5. jasrob

    jasrob

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    1
     
    dwilson_magic likes this.