Kinect.KinectManager.GetJointOrientation C# (CSharp) Method

GetJointOrientation() public method

Gets the joint orientation of the specified user.
public GetJointOrientation ( Int64 userId, int joint, bool flip ) : Quaternion
userId Int64 User ID
joint int Joint index
flip bool If set to true, this means non-mirrored rotation
return UnityEngine.Quaternion
        public Quaternion GetJointOrientation(Int64 userId, int joint, bool flip)
        {
            if (dictUserIdToIndex.ContainsKey(userId))
            {
                int index = dictUserIdToIndex[userId];

                if (index >= 0 && index < sensorData.bodyCount &&
                   bodyFrame.bodyData[index].bIsTracked != 0)
                {
                    if (flip)
                        return bodyFrame.bodyData[index].joint[joint].normalRotation;
                    else
                        return bodyFrame.bodyData[index].joint[joint].mirroredRotation;
                }
            }

            return Quaternion.identity;
        }
KinectManager