Search Unity

Resolved Hacking TwoBoneIKConstraint to stretch limb

Discussion in 'Animation' started by King_of_L1mbs, Jan 2, 2024.

  1. King_of_L1mbs

    King_of_L1mbs

    Joined:
    Jun 15, 2019
    Posts:
    22
    I am trying to cheat a little when reaching for a target with a humanoid avatar an make its arms a little longer. I tested raising the armstrecht in the Avatar's Muscle&Settings and could do that when using
    OnAnimatorIK() -> animator.SetIKPosition.

    But I want to use AnimationRigging. So I tried to hack the Job function in the package's
    AnimationRuntimeUtils.
    Adding something like tip.SetLocalPosition(stream, Vector3.up*20+tPos) works fine when using a simple transform setup in a test with some primitives. But something somehow not allows me to do that on my humanoid avatar. It just accepts rotation values, the bones seem to bee a fixed size/local position. I can't figure out what or where to look.

    So any help or hint is appreciated.
     
  2. King_of_L1mbs

    King_of_L1mbs

    Joined:
    Jun 15, 2019
    Posts:
    22
    I am sorry, this thread was supposed to go into Animation Rigging, if someone please could move it..
     
  3. King_of_L1mbs

    King_of_L1mbs

    Joined:
    Jun 15, 2019
    Posts:
    22
    It's like a curse. Post a question an you will find a solution yourself within minutes.

    Enable the Translate DoF option in the Additional Settings of the Avatar and it will work.
     
  4. ismart22

    ismart22

    Joined:
    Jun 20, 2023
    Posts:
    4
    Last edited: Feb 10, 2024