protected virtual Transform GetBoneMid(HumanBodyBones boneLimbID) { if (boneLimbID == HumanBodyBones.Hips || boneLimbID == HumanBodyBones.Head) { return(_animator.GetBoneTransform(HumanBodyBones.Spine)); } else if (boneLimbID == HumanBodyBones.LeftEye || boneLimbID == HumanBodyBones.RightEye) { return(_animator.GetBoneTransform(HumanBodyBones.Head)); } return(_animator.GetBoneTransform(QuickHumanTrait.GetParentBone(boneLimbID))); }
public virtual void LoadTPose() { _animator.EnforceTPose(); //Reset the IKTargets for (IKBone ikBone = 0; ikBone < IKBone.LastBone; ikBone++) { QuickIKSolver ikSolver = GetIKSolver(ikBone); HumanBodyBones boneID = ToHumanBodyBones(ikBone); ResetIKTarget(boneID, ikSolver._targetLimb); ikSolver._targetLimb.parent = GetIKTargetParent(boneID); if (ikSolver._targetLimb.childCount > 0) { ikSolver._targetLimb.GetChild(0).rotation = ikSolver._boneLimb.rotation; } if (ikSolver._targetHint) { ResetIKTarget(QuickHumanTrait.GetParentBone(boneID), ikSolver._targetHint); } } }