Kinect.KinectManager.GetJointPosition C# (CSharp) Method

GetJointPosition() public method

Gets the joint position of the specified user, in meters.
public GetJointPosition ( Int64 userId, int joint ) : Vector3
userId Int64 User ID
joint int Joint index
return UnityEngine.Vector3
        public Vector3 GetJointPosition(Int64 userId, int joint)
        {
            if (dictUserIdToIndex.ContainsKey(userId))
            {
                int index = dictUserIdToIndex[userId];

                if (index >= 0 && index < sensorData.bodyCount &&
                    bodyFrame.bodyData[index].bIsTracked != 0)
                {
                    if (joint >= 0 && joint < sensorData.jointCount)
                    {
                        KinectInterop.JointData jointData = bodyFrame.bodyData[index].joint[joint];
                        return jointData.position;
                    }
                }
            }

            return Vector3.zero;
        }
KinectManager