- This topic has 0 replies, 1 voice, and was last updated 4 weeks ago by Haram Choi.
- AuthorPosts
- 07/11/2024 at 09:58 #29812Haram ChoiParticipant
Hello, I am conducting research on eye tracking using Unity, C#, the Tobii XR SDK, and the Vive Pro Eye.
I am working on obtaining gaze velocity in Unity.
In Unity, I have calculated gaze velocity as follows:
Gaze Velocity = Angular Change / (Current Time – Previous Time)Here is the code:
void Update()
{
// Get current gaze data
var eyeTrackingData = TobiiXR.GetEyeTrackingData(TobiiXR_TrackingSpace.World);
Vector3 currentGazeDirection = eyeTrackingData.GazeRay.Direction;// Calculate gaze velocity
float currentTime = Time.time;
float deltaTime = currentTime – previousTime;
float angleChange = Vector3.Angle(previousGazeDirection, currentGazeDirection);
float gazeVelocity = angleChange / deltaTime;
}
Is this a correct way to calculate gaze velocity?
I would appreciate it if you could confirm whether this approach is valid, as I do not have any experts in eye tracking among my acquaintances.Also, among the gaze tracking data provided by the Tobii XR SDK(according to API Reference https://developer.tobii.com/xr/develop/xr-sdk/documentation/api-reference/), Direction is described as “The normalized direction vector for the direction of the gaze ray.” Can you elaborate on what a normalized gaze vector is? Is this vector value derived from the gaze origin? Also, can you tell me whether this gaze vector includes head rotation? I’m not sure if I should include head rotation when calculating gaze velocity.
I look forward to your response.Thank you.
- AuthorPosts
- You must be logged in to reply to this topic.