public static HumanBodyBones ToUnityBone(Joint joint) { switch (joint) { case Joint.ROOT: return HumanBodyBones.Hips; case Joint.SPINE: return HumanBodyBones.Spine; case Joint.NECK: return HumanBodyBones.Neck; case Joint.SHOULDER_LEFT: return HumanBodyBones.LeftUpperArm; case Joint.ELBOW_LEFT: return HumanBodyBones.LeftLowerArm; case Joint.WRIST_LEFT: return HumanBodyBones.LeftHand; case Joint.SHOULDER_RIGHT: return HumanBodyBones.RightUpperArm; case Joint.ELBOW_RIGHT: return HumanBodyBones.RightLowerArm; case Joint.WRIST_RIGHT: return HumanBodyBones.RightHand; case Joint.HIP_LEFT: return HumanBodyBones.LeftUpperLeg; case Joint.KNEE_LEFT: return HumanBodyBones.LeftLowerLeg; case Joint.ANKLE_LEFT: return HumanBodyBones.LeftFoot; case Joint.HIP_RIGHT: return HumanBodyBones.RightUpperLeg; case Joint.KNEE_RIGHT: return HumanBodyBones.RightLowerLeg; case Joint.ANKLE_RIGHT: return HumanBodyBones.RightFoot; } throw new System.Exception("Joint type " + joint.ToString() + " is not handled."); }