Skip to content

HMD Specific Information

Tobii XR 1.8.0.168

Setup

Import the Tobii SDK Unity Package and add the TobiiXR Initializer prefab to your scene. The SteamVR package is recommended, but not required.

If you import the SteamVR package, you will need to remove this file Assets\TobiiXR\Examples\Utilities\Controller\Plugins\openvr_api.cs

Fove

Setup

To capture the participant's gaze correctly, you must set the Fove Interface GameObject with the Camera Component to be tagged as MainCamera.

fove main camera

ExitPoll

As the Fove does not have a microphone built in, the ExitPoll microphone popup will not detect audio input unless there is a separate microphone connected and enabled.

Vive Pro Eye

Setup

Import the Vive-SRanipal-Unity-Plugin.unitypackage into your project. In your scene, add a new GameObject and add the SRanipal_Eye_Framework component. Make sure the SR_Runtime is running and you have calibrated the eye tracker using the SteamVR calibration tool.

It is recommended to set 'Enable Eye Data Callback' to true on the SRanipal Eye Framework prefab, but this is not required.

Pupil Labs Vive Add-on

Setup

The Pupil Labs Unity SDK requires Unity 2018.3 or newer

  1. Install the Vive Add-On
  2. Download the Pupil Software and run Pupil Capture.exe
  3. Download and import the Hmd-Eyes.VR.v1.0.unitypackage
  4. Add the Assets/Plugins/Pupil/Prefabs/Gaze Tracker prefab into your scene. In that prefab:
    • Select the Gaze Visualizer GameObject and set the Gaze Origin variable to the Main Camera
    • Select the Calibration Controller GameObject and set the Camera variable to the Main Camera
    • Select the Connection GameObject and check that the Port matches the settings in the Pupil Capture.exe
  5. Open the Project Settings from the Edit Menu. Select the Player category. Then:
    • Set the Scripting Runtime Version to .Net 4.x Equivalent
    • Set the API Compatibility Level to .Net 4.x
  6. Open the Cognitive Scene Setup. Select Pupil Labs SDK. Continue through the setup process.
  7. It is recommended that you select the CognitiveVR_Manager and disable Initialize On Start and enable Initialize After Calibration

Play and press C to begin calibrating the Pupil Labs eye tracking.

Camera Focus

If the Pupil Labs cameras are not correctly focused, they may not correctly record eye position

Leap Motion Controller 4.0.0

The implementation below for Leap Motion Controller does not record the full articulation of each finger, just the transform of each palm.

Leap Motion Interaction Module requires Unity 2017.2 or newer.

Setup

  1. Add a Leap Rig prefab into your scene
  2. Add a LoPoly Rigged Hand Left and Right parented to the Leap Rig/Hand Models GameObject
  3. On the Hand Models gameobject, in the Hand Model Manager component, replace the Left Model and Right Model fields with the LoPoly Rigged Hand GameObjects
  4. Delete the Capsule Hand GameObjects
  5. Add Dynamic Object components to the LoPoly Rigged Hand Left/L_Wrist/L_Palm. Make sure to select deselect Custom Mesh and choose Leap Motion Hand Left from the dropdown. Repeat this for the right hand.

Common Hand Events

Using the Detector components (such as FingerDirectionDetector, PalmDirectionDetector, etc) from the Leap Motion Interaction module, you can easily add Dynamic Object Engagements to a Hand Dynamic Object. Here is an example setup:

leapmotion point event

The script used in this example is:

using UnityEngine;
public class EngagementEvent : MonoBehaviour
{
    public CognitiveVR.DynamicObject TargetDynamic;
    public string EngagementName = "point";

    public void BeginEngagement()
    {
        if (TargetDynamic != null)
            TargetDynamic.BeginEngagement(EngagementName);
    }

    public void EndEngagement()
    {
        if (TargetDynamic != null)
            TargetDynamic.EndEngagement(EngagementName);
    }
}