Eye Tracking

VIVE Wave™ plugin supports the Eye Tracking feature. By following this guide you can retrieve the tracking data of left, right and combined eyes. The Eye Tracking data contains:

  • Gaze origin
  • Gaze direction
  • Eye openness
  • Pupil diameter
  • Pupil position

You can use Eye Tracking data to implementing the Gaze feature. VIVE Wave™ plugin also provides an Actor component of Eye Tracking Gaze named WaveVRGazePointer.

Modify AndroidManifest.xml

To enable the Eye Tracking feature, you have to add below content to your AndroidManifest.xml.

<uses-feature android:name="wave.feature.eyetracking" android:required="true" />

Or you can go to Project Settings > Plugins > Wave VR > Render and select the Enable Eye Tracking option.

../_images/UnrealEyeTracking02.png

Eye Tracking API

VIVE Wave™ plugin supports the Unreal UEyeTrackerFunctionLibrary and VIVE Wave™ plugin uses Unreal UEyeTrackerFunctionLibrary in Plugins > WaveVR > Source > WaveVR > Private > InputModule > WaveVRGazePointer.cpp.

Instead of using the Unreal UEyeTrackerFunctionLibrary, VIVE Wave™ plugin provides the Eye Blueprint Function Library in Plugins > WaveVR > Source > WaveVR > Public > Eye > WaveVREyeBPLibrary.h listed as below.

#include "Eye/WaveVREyeBPLibrary.h"

UENUM(BlueprintType, Category = "WaveVR|Eye")
enum class EWaveVREyeTrackingStatus : uint8
{
        // Initial, can call Start API in this state.
        NOT_START,
        START_FAILURE,

        // Processing, should NOT call API in this state.
        STARTING,
        STOPPING,

        // Running, can call Stop API in this state.
        AVAILABLE,

        // Do nothing.
        UNSUPPORT
};

void UWaveVREyeBPLibrary::StartEyeTracking(EWVR_CoordinateSystem coordinate)
void UWaveVREyeBPLibrary::StopEyeTracking()
void UWaveVREyeBPLibrary::RestartEyeTracking()
EWaveVREyeTrackingStatus UWaveVREyeBPLibrary::GetEyeTrackingStatus()
bool UWaveVREyeBPLibrary::IsEyeTrackingAvailable()
bool UWaveVREyeBPLibrary::IsStereoEyeDataAvailable()

EWVR_CoordinateSystem UWaveVREyeBPLibrary::GetEyeSpace()

// Combined eye data
bool UWaveVREyeBPLibrary::GetCombinedEyeOrigin(FVector& origin)
bool UWaveVREyeBPLibrary::GetCombindedEyeDirectionNormalized(FVector& direction)

// Left eye data
bool UWaveVREyeBPLibrary::GetLeftEyeOrigin(FVector& origin)
bool UWaveVREyeBPLibrary::GetLeftEyeDirectionNormalized(FVector& direction)
bool UWaveVREyeBPLibrary::GetLeftEyeOpenness(float& openness)
bool UWaveVREyeBPLibrary::GetLeftEyePupilDiameter(float& diameter)
bool UWaveVREyeBPLibrary::GetLeftEyePupilPositionInSensorArea(FVector2D& position)

// Right eye data
bool UWaveVREyeBPLibrary::GetRightEyeOrigin(FVector& origin)
bool UWaveVREyeBPLibrary::GetRightEyeDirectionNormalized(FVector& direction)
bool UWaveVREyeBPLibrary::GetRightEyeOpenness(float& openness)
bool UWaveVREyeBPLibrary::GetRightEyePupilDiameter(float& diameter)
bool UWaveVREyeBPLibrary::GetRightEyePupilPositionInSensorArea(FVector2D& position)

You can refer to Plugins > WaveVR > Source > WaveVREyeTracker > Private > FWaveVREyeTracker.cpp about the usage of Wave Eye Blueprint Function Library.

We recommend that you use the Unreal UEyeTrackerFunctionLibrary since it’s easier understanding.

WaveVRGazePointer

You can refer to Input - Adding a WaveVRGazePointer component about the usage of WaveVRGazePointer.

For Eye Tracking, WaveVRGazePointer provides an additional option as below photo.

../_images/UnrealEyeTracking01.png

When Eye Tracking is selected, the Gaze pointer moves following your sight if you already enabled the Eye Tracking feature. (refer to Modify AndroidManifest.xml)