public void OnGazeUpdate(GazeData gazeData) { if (gazeData.StateToString() != "STATE_TRACKING_GAZE | STATE_TRACKING_EYES | STATE_TRACKING_PRESENCE") { return; } Point2D leftPupil = gazeData.LeftEye.PupilCenterCoordinates; Point2D rightPupil = gazeData.RightEye.PupilCenterCoordinates; Point2D newGazePoint = gazeData.SmoothedCoordinates; if (leftPupil.X == 0 || leftPupil.Y == 0 || rightPupil.X == 0 || rightPupil.Y == 0 || newGazePoint.X == 0 || newGazePoint.Y == 0) { return; } gazePoint = newGazePoint; }