Tagged: Get gazed (focus) position
- 06/10/2020 at 11:51 #18995Yotam Hagur-BahatParticipant
Hello, I am using the HTC VIVE PRO with TOBII eye tracker. I am trying to get the position of the gazed object. I followed the instructions in the developer zone (https://developer.tobii.com/pc-gaming/unity-sdk/scripting-api/#tobiiapigetgazepoint) but both functions ‘GetFocusedObject’ and ‘GetGazedPoint’ doesn’t work for some reason. I installed both TobiiXR and Tobii (SDK) packages and wrote a script with the two functions. but I don’t get the prints. Here is the script :
public class TobiiGaming : MonoBehaviour
GazePoint gazePoint = TobiiAPI.GetGazePoint();
print(“Gaze Point On Screen (X,Y) ” + gazePoint.Screen.x + “, ” + gazePoint.Screen.y);
GameObject focusedObject = TobiiAPI.GetFocusedObject();
if (null != focusedObject)
print(“The focused game object is: ” + focusedObject.name + ” (ID: ” + focusedObject.GetInstanceID() + “)”);
Please advise07/10/2020 at 11:25 #19002Grant [Tobii]Keymaster
Hi @yotam, on order to use eye-tracking with the HTC VIVE PRO, you need to use the XR Unity SDK whilst it appears from your code you are using the Unity SDK for Desktop API.
You can download the appropriate SDK for your hardware @ https://vr.tobii.com/sdk/develop/unity/ which comes with the appropriate tutorial and getting started guide.
Please go through this and let us know how you get on. Best Wishes.
- You must be logged in to reply to this topic.