private void TwoBoneIk( GameObject skeletonObject, Bone bone1, Vector3 targetPosition, Vector3 elbowTargetOffset ) { var bone1Object = skeletonObject.FindDescendant(bone1.Name); var bone2 = bone1.Children[0]; var bone2Object = skeletonObject.FindDescendant(bone2.Name); var targetElbowPosition = bone1Object.transform.position + elbowTargetOffset; GameObjectExtensions.TwoBoneIk( bone1Object.transform, bone1.Length, bone2Object.transform, bone2.Length, targetPosition, targetElbowPosition, true ); }