• Official comment

Hi Sabarareesh,

Could you tell me which function you're calling, which data you're trying to read ?

Cheers,

Kevin

Team FOVE

Hi Kevin,

I am also interest this x, y, z value  and also the unit of the value.

I use the FOVE debug tool, when I start that tool, from the window, under Eye part, there is a left and right eye gaze vector.that list x, y , z. those data changes as eye moving, but I like to know what is the unit of the value? For example, the x is change from -1.0 to +1.0. Is it in degree? or in ? Also I don't know what is the z value means, It is not about the distance from eye to screen?

Thank you very much.

Lian

Hi Lian,They represent a vector.

Hi Jeremy,

Thanks for reply. I want to know: since it is vector, so the eye as origin? As I tested, horizontal is X, Vertical is Y. and of course, the depth will be Z. So when I move eye along the horizontal, the X value changes, is that means the angle from center to side in horizontal?

Thanks,

but the extracted data in

x =

0.057 ,

y=

0.146 ,

z=

 0.051

Ahmed Salama since the gaze vectors should be unit vectors (magnitude of one), (x=0.057, y=0.146, z=0.051) is not a valid output, at least for a gaze vector. It could be a valid position tracking value though.

Which function / field did you get this from? Was it from the SDK or the Debug tool?

At the end I need the position of the pupil and I confused between the direction of the ray and the position because they are together X,y,z
What each axis represent for X,y,z for position and direction , I use the getGazeVector( )

Per the article linked above: x is horizontal, y is vertical, z is depth, in relation to the users face.

For the combined gaze, there's a position and a direction. The position is the starting point of the combined gaze ray, where (0,0,0) is the midpoint between the eyes. Generally the position is (0, 0, 0) but if one eye is closed it may move along the X axis to either eye (for example if the right eye is closed, the combined gaze vector will come from the left eye and thus the position will be left of center).

For getGazeVector() there is no position provided because it's always from the center of the particular eye, which you can easily calculate.

It has a small impact on accuracy for nearby objects, but it's not a big deal to ignore position and just treat everything like it's coming out of the center. If you're just getting things working still, I'd recommend only worrying about direction.

i'll not use the get combined gaze so i'll skip it , so about the getGazeVector function the x,y,z for the current position of the Pupil ( In Real its the direction but there is a small difference as you said ) ,because from these x,y,z i need to calculate some accurate angles so i think if the IOD for the user is for example 60 mm

so the center of the left eye is ( - .03 ,0,0 ) and for the right eye (.03,0,0)

hence i will for each coming vector from the getGazevector calculate the difference between

coming vector - origin of the eye

is this will be right ???

and the last thing to extract x or y or z is the next code well ?

x = leftVec.value.x

y= ..

z = ...

( -.03 ,0,0 ) and (.03,0,0) are the correct positions for the left and right eye (for an IPD of .06).

However, you don't need the position at all if you just want to compute the angle of the gaze. You can just use trigonometry on the gaze direction X/Y/Z values to compute the angle, per the article above. Namely using atan2().

However, if you are trying to compute the angle between the gaze and some object in the 3D scene all you need to do is

1. Make sure everything is in the same coordinate system. If you're in an engine it's probably easiest to convert everything to world coordinates.
2. Subtract the eyeball position from the object position to get the eyeball-to-object direction (and normalize it to magnitude one)
3. take the dot product between the eyeball-to-object direction and the eyeball-direction,
`angle = acos(normalize(object.position - eye.position).dotProduct(eye.direction));`

But generally we recommend using the game engines ray intersection handling to do real object collision as the above only handles infinitely small points, rather than 3D objects with volume.

Excellent and what you said will help me in another part after , but I told origin because of the next ..
here I need two angles compared to the oingin of the eye
let's say the pupil first In its origin assume right eye after small time it moved to another position so I have a new X,Y,Z in this movement and i need to calculate in this time the vertical angle and the horizontal angle In degrees Between these two point [x,y,z in origin and x,y,z the new position of pupil ] and the next movement I will also extract the angles between the second movement and the origin
So what I need to illustrate is the getGazeVector will give me the current position of the pupil which I will use it with the origin to extract my angles
You told me befor that angles will be
X/z. For horizontal
Y/z for vertical