Search Unity

Question Problem with IK and animations

Discussion in 'Animation' started by Hacker237, Aug 19, 2022.

  1. Hacker237

    Hacker237

    Joined:
    Jan 3, 2020
    Posts:
    18
    Hi all! I have a problem. It will be great if you help.
    I have a 2D human character. It has a skeleton and inverse kinematics. I created animations for him such as running, jumping, walking and more. But he can also hold a weapon. To hold a weapon, I need to turn off hand animations. I've already figured out that in LateUpdate() is processed after the animations. I made moving the targets of the hands for inverse kinematics in LateUpdate(). The targets themselves move where they need to, but as if the inverse kinematics are turned off and the hands simply do not want to follow the target.
    How do I get the character's hands to follow the target? Maybe I can somehow update the inverse kinematics through the script?
    I am using unity version 2020.1.4f1.