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.
PlayerAnimator.SetIKPositionWeight(AvatarIKGoal.RightHand, Therload);
PlayerAnimator.SetIKRotationWeight(AvatarIKGoal.RightHand, Therload);
PlayerAnimator.SetIKPosition(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.position);
PlayerAnimator.SetIKRotation(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.rotation);
PlayerAnimator.SetIKHintPosition(AvatarIKHint.RightElbow, PlayerControl.RightElbowOffsetClimb.transform.position);
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:
PlayerAnimator.SetIKPositionWeight(AvatarIKGoal.RightHand, Therload);
PlayerAnimator.SetIKRotationWeight(AvatarIKGoal.RightHand, Therload);
PlayerAnimator.SetIKPosition(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.position);
PlayerAnimator.SetIKRotation(AvatarIKGoal.RightHand, ActionStairs.Stairs[CurrentStairsIndex].GetComponent<StairBarInfo>().RightHandPosition.transform.rotation);
PlayerAnimator.SetIKHintPosition(AvatarIKHint.LeftElbow, PlayerControl.RightElbowOffsetClimb.transform.position);
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.