Kinect.FacetrackingManager.GetHeadRotation C# (CSharp) Method

GetHeadRotation() public method

Gets the head rotation of the currently tracked user.
public GetHeadRotation ( bool bMirroredMovement ) : Quaternion
bMirroredMovement bool If set to true returns mirorred head rotation.
return UnityEngine.Quaternion
        public Quaternion GetHeadRotation(bool bMirroredMovement)
        {
            Vector3 rotAngles = bGotHeadRot ? headRot.eulerAngles : Vector3.zero;

            if (bMirroredMovement)
            {
                rotAngles.x = -rotAngles.x;
                rotAngles.z = -rotAngles.z;
            }
            else
            {
                rotAngles.x = -rotAngles.x;
                rotAngles.y = -rotAngles.y;
            }

            return Quaternion.Euler(rotAngles);
        }

Same methods

FacetrackingManager::GetHeadRotation ( long userId, bool bMirroredMovement ) : Quaternion