public static MVector2 GetHandRelativePosition(this Body body, bool isLeft)
        {
            CameraSpacePoint handPos   = body.Joints[isLeft ? JointType.HandLeft : JointType.HandRight].Position;
            CameraSpacePoint spineBase = body.Joints[JointType.SpineBase].Position;

            return(handPos.ToMVector2() - spineBase.ToMVector2() + gestureOffsets[isLeft ? 0 : 1]);
        }
Esempio n. 2
0
        public static MVector2 GetHandSmoothedRelativePosition(this CameraSpacePoint[] joints, bool isLeft)
        {
            CameraSpacePoint handPos   = joints[(int)(isLeft ? JointType.HandLeft : JointType.HandRight)];
            CameraSpacePoint spineBase = joints[(int)(JointType.SpineBase)];

            return(handPos.ToMVector2() - spineBase.ToMVector2() + gestureOffsets[isLeft ? 0 : 1]);
        }