private void UpdateSkeleton(KinectV2::Microsoft.Kinect.Body body, ISkeleton newSkeleton) { foreach (KeyValuePair<JointType, KinectV2::Microsoft.Kinect.JointType> jointMapping in mapping) { var joint = new OrientedJoint { JointType = jointMapping.Key, Point = ToVec3(body.Joints[jointMapping.Value].Position), Orientation = ToVec4(body.JointOrientations[jointMapping.Value].Orientation), Valid = body.Joints[jointMapping.Value].TrackingState == KinectV2::Microsoft.Kinect.TrackingState.Tracked }; newSkeleton.UpdateSkeleton(joint.JointType, joint); } }