GetIKPosition() public method

public GetIKPosition ( AvatarIKGoal goal ) : Vector3
goal AvatarIKGoal
return Vector3
        private void OnAnimatorIK(int layerIndex)
        {
            if (animator != null)
            {
                animator.SetLookAtWeight(lookAtWeight, lookAtBodyWeight, lookAtHeadWeight, lookAtEyesWeight, lookAtClampWeight);
                animator.SetLookAtPosition(lookAtPosition);

                animator.SetIKPositionWeight(AvatarIKGoal.RightHand, rightHandPosWeight);
                animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, leftHandPosWeight);
                animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, rightFootPosWeight);
                animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, leftFootPosWeight);

                animator.SetIKRotationWeight(AvatarIKGoal.RightHand, rightHandRotWeight);
                animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, leftHandRotWeight);
                animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, rightFootRotWeight);
                animator.SetIKRotationWeight(AvatarIKGoal.LeftFoot, leftFootRotWeight);

                animator.SetIKHintPositionWeight(AvatarIKHint.RightElbow, rightElbowPosWeight);
                animator.SetIKHintPositionWeight(AvatarIKHint.LeftElbow, leftElbowPosWeight);
                animator.SetIKHintPositionWeight(AvatarIKHint.RightKnee, rightKneePosWeight);
                animator.SetIKHintPositionWeight(AvatarIKHint.LeftKnee, leftKneePosWeight);

                animator.SetIKPosition(AvatarIKGoal.RightHand, rightHandPos);
                animator.SetIKPosition(AvatarIKGoal.LeftHand, leftHandPos);
                animator.SetIKPosition(AvatarIKGoal.RightFoot, rightFootPos);
                animator.SetIKPosition(AvatarIKGoal.LeftFoot, leftFootPos);

                animator.SetIKHintPosition(AvatarIKHint.RightElbow, rightElbowPos);
                animator.SetIKHintPosition(AvatarIKHint.LeftElbow, leftElbowPos);
                animator.SetIKHintPosition(AvatarIKHint.RightKnee, rightKneePos);
                animator.SetIKHintPosition(AvatarIKHint.LeftKnee, leftKneePos);

                animator.SetIKRotation(AvatarIKGoal.RightHand, rightHandRot);
                animator.SetIKRotation(AvatarIKGoal.LeftHand, leftHandRot);
                animator.SetIKRotation(AvatarIKGoal.RightFoot, rightFootRot);
                animator.SetIKRotation(AvatarIKGoal.LeftFoot, leftFootRot);

                internalLeftFootPos  = animator.GetIKPosition(AvatarIKGoal.LeftFoot);
                internalRightFootPos = animator.GetIKPosition(AvatarIKGoal.RightFoot);
                internalLeftHandPos  = animator.GetIKPosition(AvatarIKGoal.LeftHand);
                internalRightHandPos = animator.GetIKPosition(AvatarIKGoal.RightHand);

                internalLeftFootRot  = animator.GetIKRotation(AvatarIKGoal.LeftFoot);
                internalRightFootRot = animator.GetIKRotation(AvatarIKGoal.RightFoot);
                internalLeftHandRot  = animator.GetIKRotation(AvatarIKGoal.LeftHand);
                internalRightHandRot = animator.GetIKRotation(AvatarIKGoal.RightHand);

                internalLeftKneePos   = animator.GetIKHintPosition(AvatarIKHint.LeftKnee);
                internalRightKneePos  = animator.GetIKHintPosition(AvatarIKHint.RightKnee);
                internalLeftElbowPos  = animator.GetIKHintPosition(AvatarIKHint.LeftElbow);
                internalRightElbowPos = animator.GetIKHintPosition(AvatarIKHint.RightElbow);


                internalLeftFootPosWeight  = animator.GetIKPositionWeight(AvatarIKGoal.LeftFoot);
                internalRightFootPosWeight = animator.GetIKPositionWeight(AvatarIKGoal.RightFoot);
                internalLeftHandPosWeight  = animator.GetIKPositionWeight(AvatarIKGoal.LeftHand);
                internalRightHandPosWeight = animator.GetIKPositionWeight(AvatarIKGoal.RightHand);

                internalLeftFootRotWeight  = animator.GetIKRotationWeight(AvatarIKGoal.LeftFoot);
                internalRightFootRotWeight = animator.GetIKRotationWeight(AvatarIKGoal.RightFoot);
                internalLeftHandRotWeight  = animator.GetIKRotationWeight(AvatarIKGoal.LeftHand);
                internalRightHandRotWeight = animator.GetIKRotationWeight(AvatarIKGoal.RightHand);

                internalLeftKneeWeight   = animator.GetIKHintPositionWeight(AvatarIKHint.LeftKnee);
                internalRightKneeWeight  = animator.GetIKHintPositionWeight(AvatarIKHint.RightKnee);
                internalLeftElbowWeight  = animator.GetIKHintPositionWeight(AvatarIKHint.LeftElbow);
                internalRightElbowWeight = animator.GetIKHintPositionWeight(AvatarIKHint.RightElbow);
            }
        }