Home Forums Unity SDK Eye Tracking Data

This topic contains 1 reply, has 2 voices, and was last updated by  Grant [Tobii] 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12212

    Johnson Olayiwola
    Participant

    Hello everyone,
    So I just integrated the Vive pro eye in unity, but I don’t know how to get the raw data (gaze data). Am I installing another software to output the raw data? Thanks.

    #12217

    Grant [Tobii]
    Moderator

    Hi @johnolap and thanks for your query. You can get access to the gaze data from the eye tracker device via the GazeRay object.

    The GazeRay is a Struct containing the gaze ray for left and right eye composed of: Origin – The point in world space for the origin of the gaze ray & Direction – The normalized direction vector in world space for the direction of the gaze ray.

    Please find below a simple code snippet to use this object

    private void Update () 
    {
        var gazeRay = TobiiXR.EyeTrackingData.GazeRay;
    
        // Check if gaze ray is valid
        if(TobiiXR.EyeTrackingData.GazeRay.IsValid)
        {
            // Eye Origin is in World Space
            var rayOrigin = TobiiXR.EyeTrackingData.GazeRay.Origin;
    
            // Eye Direction is a normalized direction vector in World Space
            var rayDirection = TobiiXR.EyeTrackingData.GazeRay.Direction;
        }
    }

    You can find further details about this @ https://vr.tobii.com/sdk/develop/unity/documentation/api-reference/

    Please do let us know if we can provide any further information. Best Wishes.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.