Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to setup IK constrains for squats?

Discussion in 'Animation' started by Huxii, May 28, 2022.

  1. Huxii

    Huxii

    Joined:
    Sep 15, 2018
    Posts:
    36
    Hello,

    I have already setup the "Two bone IK constraint" for legs, so that I can walk. Now I would like to make squats, but this is at the moment not possible. I expected, that when I just drag hips down, that the feet and targets would stay on spot so that the player would knee down automatically. But instead, the feet go down too, even thought the targets stay on spot - see picture

    My question: I guess I need to setup some additional IK constraints also for hips, but I am not sure how to do that. I tired different option, but none is working. I have searched this in google and youtube, but did not find anything helpful. Does somebody know how to do that?

    Thank you
    Huxi
     

    Attached Files:

  2. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    203
    How does your skeleton hierarchy look like? I guess that targets for legs IK are in the same hierarchy as hips so when you move hips down they move all together. Would it work for you to put legs IK target transforms in a different hierarchy like in the 2BoneIK sample scene? upload_2022-5-28_23-5-23.png
     
  3. Huxii

    Huxii

    Joined:
    Sep 15, 2018
    Posts:
    36
    Hi, my IK are not in the same hierarchy. They are separated.
    upload_2022-5-29_10-41-11.png
     

    Attached Files:

  4. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    203
    I don't see anything obvious in your setup that's causing it. Do you mind sharing the the rig with me in a private message so I can take a look?