Home Forums Unreal Engine 4 SDK What parameter can read left eye or right eye closed Reply To: What parameter can read left eye or right eye closed

#19026
Grant [Tobii]
Keymaster

Hi @faker, if indeed all you want is the validity of left/right eye found, you could try this snipped from the c++ stream engine API.

#include <tobii/tobii_streams.h>
#include <stdio.h>
#include <assert.h>

void gaze_origin_callback( tobii_gaze_origin_t const* gaze_origin, void* user_data )
{
    if( gaze_origin->left_validity == TOBII_VALIDITY_VALID )
        printf( "Left Eye Found" );

    if( gaze_origin->right_validity == TOBII_VALIDITY_VALID )
        printf( "Right Eye Found );

    printf( "\n" );
}

Try it out and let us know how you get on. Best wishes.