private void SetFingerCurl(FingersTarget.TargetedFinger finger, float inputValue) { if (inputValue < 0) { finger.curl = 0.1F * inputValue; } else { finger.curl = inputValue; } }
private static void UpdateFinger(Quaternion handRotation, FingersTarget.TargetedFinger finger) { Quaternion proximalRotation = CalculatePhalanxRotation(finger.proximal, handRotation); finger.proximal.SetBoneRotation(proximalRotation); Quaternion intermediateRotation = CalculatePhalanxRotation(finger.intermediate, proximalRotation); finger.intermediate.SetBoneRotation(intermediateRotation); Quaternion distalRotation = CalculatePhalanxRotation(finger.distal, intermediateRotation); finger.distal.SetBoneRotation(distalRotation); }