Answer the question
In order to leave comments, you need to log in
Why doesn't IK of arms work if the target object is a child of character bones?
I try to keep the character's hands on the weapon:
animator.SetLookAtWeight(1, 1, 0.5f, 0);
animator.SetLookAtPosition(Application.instance.characterLookAtPoint.position);
if (leftHandPos != null && rightHandPos != null)
{
animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, 1);
animator.SetIKPosition(AvatarIKGoal.LeftHand, leftHandPos.position);
animator.SetIKRotation(AvatarIKGoal.LeftHand, leftHandPos.rotation);
animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 1);
animator.SetIKRotationWeight(AvatarIKGoal.RightHand, 1);
animator.SetIKPosition(AvatarIKGoal.RightHand, rightHandPos.position);
animator.SetIKRotation(AvatarIKGoal.RightHand, rightHandPos.rotation);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question