Search Unity

Two bone IK works on arms, not on legs

Discussion in 'Animation Rigging' started by akent99, Oct 30, 2020.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Is there any known gotchas using rig builder to add IK constraints to legs? I added two-bone-IK to the arms and it works fine. I added them using exactly the same approach to the legs, but it seems to have some effect (the knees change directions slightly when enabled/disabled) but I cannot move the feet. I am wondering if there could be some setting somewhere trying to keep the feet on the ground?

    I am trying to have a character on a scooter. The arms move when I steer the scooter, but I cannot get the feet to position themselves on the narrow base.

     
  2. Vhalen

    Vhalen

    Joined:
    Oct 27, 2016
    Posts:
    9
    Hello !
    Of course IK works with legs, but depending of your bone structure you can encounter certain issues.
    I had this issue when working on IK for a spine, it didn't worked if the chain started on parent bone of all the rig, I had to add a new bone to the Blender base Rig.

    And be sure to have your rig active, with a weight of 1 in the rig and controllers. And check in your rigBuilder component if the IK rig is activated sometimes this is just a dumb mistake.

    I recorded this gif if it can be helful for you :


    Good luck !
     
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Thanks for the reply! Yes, i checked the constraint properties carefully and they are the same (including weight). Since the legs twitch at the knees it feels like it is trying to do something, but something else was overriding the rig constraints. I am a relative newbie to Unity, so my guess is the idle animation was trying to ground the feet or something, so two scripts were competing to control the feet placement. But I had no idea where to look if such a setting exists.

    I think my next step is to have a blank scene with just the character, remove as many scripts as possible, then see if i can move the legs. Then build the scene up bit by bit.
     
    Vhalen likes this.
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Very very confusing. I deleted everything else from the scene, go to PREVIEW mode in the Animation tab, I can successfully move the legs up and down, just like arms. I go out of PREVIEW Animation mode and go into record mode for a timeline animation track (using an override track). The feet just follow the clip (I cannot work out how to override them). The hands however are stuck in the "hold the handlebars" position! Ummm, why??? The whole scooter and script holding the hands in place has been deleted from the scene, I have not recorded anything for the hands, but it still holds the hands in that place. Why are the hands not moving with the animation clip but the feet are? I really don't understand.
     
  5. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Oh more fun. I deleted the whole rig subtree, the hands were still stuck in the air (holding the handlebars). The only thing in the scene is the character (not scooter or script managing the scooter). I then mute the override track and unmute it. The hands now are next to the body - not in the air. That is, muting the override track then re-enabling it changed the positions of the hands from being in the air holding the handlebars, to the hands following the walk cycle. I did not change the recording - just muted and unmuted an override track. Feels like the rigging animation support caches some information internally.
     
  6. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    Well, I know this is an old post, but I had the same issue just now, ie. the legs not responding to the effector.
    I want to provide the answer in case anyone has the same annoying problem.
    ANSWER:
    In your animator, look for the default state were the idle pose is. In the inspector look for the "Foot IK" option. If it's check, then that's what's overrwriting your feet position. Uncheck it to take control of the feet. You can set it on and off via script if you need to. This may be happening in other activated states, so check them all if it doesn't solve the issue.
     
    Last edited: Jul 16, 2021
    kloogens, Billy4184, inmim and 14 others like this.
  7. imhungreee

    imhungreee

    Joined:
    Oct 16, 2021
    Posts:
    1
    YOU MY FRIEND ARE AWESOME! let it be known to all to always return to posts/videos when you figure out an answer to someone who has a problem no matter how long ago! (BTW The IK switch in the timeline only shows up after selecting a clip in the timeline!)
     
  8. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    Reporting in from 2022 and it took far too much googling to find this solution. Thanks
     
    CaseyHofland likes this.
  9. topitsky

    topitsky

    Joined:
    Jan 12, 2016
    Posts:
    100
    I had this problem with arms and it turns out, the animation "avatar" was messing things up. I removed that and the rig works as expected.
     
  10. To14mas

    To14mas

    Joined:
    Jul 28, 2018
    Posts:
    1
    LOVE YOU!!! How is this something you find on a forum somewhere and not in every single tutorial?
     
  11. Oreo-Thelewdcookie

    Oreo-Thelewdcookie

    Joined:
    Sep 30, 2018
    Posts:
    5
    Reporting from 2023, still work like a charm! uncheck foot IK for IK , brilliant !!!