Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 5.5 IK problem.

Discussion in 'Animation' started by Eths, Nov 14, 2016.

  1. Eths

    Eths

    Joined:
    Mar 5, 2015
    Posts:
    184
    Hello there, I have been working on a custom climbing system in unity 5.5, but I think that I found out a bug in unity 5.5, I am sure if it is there in other unity versions, but I am currently using the latest version of unity.


    Code (CSharp):
    1.                 PlayerAnimator.SetIKPositionWeight(AvatarIKGoal.RightHand, Therload);
    2.                 PlayerAnimator.SetIKRotationWeight(AvatarIKGoal.RightHand, Therload);
    3.                 PlayerAnimator.SetIKPosition(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.position);
    4.                 PlayerAnimator.SetIKRotation(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.rotation);
    5.                 PlayerAnimator.SetIKHintPosition(AvatarIKHint.RightElbow, PlayerControl.RightElbowOffsetClimb.transform.position);
    6.                 PlayerAnimator.SetIKHintPositionWeight(AvatarIKHint.RightElbow, 1f);
    This is my current code, it works perfectly fine , but the RightElbow is not moving no matter what I do. so the "RightElbow" is not moving when I am using "RightHand" in SetIKPosition, here is what I tried and it worked perfectly:

    Code (CSharp):
    1.                 PlayerAnimator.SetIKPositionWeight(AvatarIKGoal.RightHand, Therload);
    2.                 PlayerAnimator.SetIKRotationWeight(AvatarIKGoal.RightHand, Therload);
    3.                 PlayerAnimator.SetIKPosition(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.position);
    4.                 PlayerAnimator.SetIKRotation(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.rotation);
    5.                 PlayerAnimator.SetIKHintPosition(AvatarIKHint.LeftElbow, PlayerControl.RightElbowOffsetClimb.transform.position);
    6.                 PlayerAnimator.SetIKHintPositionWeight(AvatarIKHint.LeftElbow, 1f);
    I noticed that the "LeftElbow" is corrisponding fine to the "RightElbowOffsetClimb" object position, but the "RightElbow" together with "RightHand" doesn't work at all, I tried to change the order but the problem presists.
     
  2. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Please log a bug with with a repro project and we will investigate.
    In my manual test they do work
     
  3. Eths

    Eths

    Joined:
    Mar 5, 2015
    Posts:
    184
    Hello, I have created a repro project and logged a bug like you suggested with title "Unity IKHintPosition and Unity IKPosition" I have explained how you can see the bug and also how to see it working with left elbow as ikhintposition and right hand as the ikposition, the case id is #851217.

    Please notice that I am using Unity 5.5.0b2,if this was a known bug that was fixed in the next unity update please let me know so I can download it, thank you.