Skip to content

Instantly share code, notes, and snippets.

@tonymtz
Created January 19, 2017 04:06
Show Gist options
  • Save tonymtz/cd0cefea9d0efba859bea7d2a3a44651 to your computer and use it in GitHub Desktop.
Save tonymtz/cd0cefea9d0efba859bea7d2a3a44651 to your computer and use it in GitHub Desktop.
EyeTracking.GetGazePoint sample
using Unity.Engine;
using Tobii.EyeTracking;
public class ExampleClass : MonoBehaviour
{
void Update()
{
GazePoint gazePoint = EyeTracking.GetGazePoint();
if (gazePoint.IsValid)
{
print("Gaze point on Screen (X,Y): " + gazePoint.Screen.X + ", " + gazePoint.Screen.Y);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment