Search Unity

IK Problem

Discussion in 'Animation' started by abuk021902, Dec 15, 2017.

  1. abuk021902

    abuk021902

    Joined:
    Mar 3, 2017
    Posts:
    11
    Hello,
    I have a weird problem with IK. When I play the game, my hand is in the wrong position it looks something like the weight has small value but it has 1.

    Code (CSharp):
    1.     private void OnAnimatorIK()
    2.     {
    3.         animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
    4.         animator.SetIKPosition(AvatarIKGoal.LeftHand, gunHandler.position);
    5.  
    6.         animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, 1);
    7.         animator.SetIKRotation(AvatarIKGoal.LeftHand, gunHandler.rotation);
    8.     }
    I found the problem on yotube:





    If someone know where is the problem, tell me please ;P
    Thanks!
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Do you have scale on your character?

    In any case please log a bug and we will investigate
     
  3. abuk021902

    abuk021902

    Joined:
    Mar 3, 2017
    Posts:
    11
    I don't have scale on this character.
    I will send this bug
     
  4. abuk021902

    abuk021902

    Joined:
    Mar 3, 2017
    Posts:
    11
    @Mecanim-Dev
    I think I found a problem.
    I attached a Animator and IK script to the to gameobject that contains player model in children, this is the problem.
    So I attached animator to the player model, and it's working but in player model i must have Network Animator and automatically gives me NetworkIdentity. Is that necessary? When I put NetworkAnimator on gameobject that contains player model and attach animator from player model it automatically gives me new animator and i cant delete this.
    What to do?
     
  5. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    I'm not sure as I never tried by myself the network feature of the animator

    Could you log a bug and give us some detail to reproduce the issue?

    Here a guide for bug reporting
    https://unity3d.com/unity/qa/bug-reporting
     
  6. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    309
    I'm having problems with IK and just realized it was the scale causing it. Is there a workaround for this?

    EDIT: I could fix this by moving the scaling upwards in the hierarchy, above the transform with the Animator and IK-script
     
    Last edited: Feb 27, 2018
  7. esraahamad97

    esraahamad97

    Joined:
    Feb 2, 2018
    Posts:
    3
    Hello guise , i want to control a finger and hand of character using FABRIC ik solver any help ?
     
  8. Norite113

    Norite113

    Joined:
    Jul 14, 2016
    Posts:
    2
    if you Have Some other Problem with Ik something like this.
    IkProblem.png
    just simple check if name bones matching name in root model
    IkProblemLook.png