Jump to content

Get unity world coordinates of sranipal gaze direction and origin coordinates

Recommended Posts

Hi, I am trying to follow what a user is looking at in a unity world scene, more precisely I am using a lineRenderer which needs 2 points to be drawn, the first point would be the gaze origin that I get from SRanipal sdk using structure.combined.eye_data.gaze_origin_mm (where structure contains the verbose data), the end point would be the gazeOrigin+gazeDirection * lengthOfLine (where I used structure.combined.eye_data.gaze_direction_normalized). The problem is that it does not work It gets me a point far where it shold be. I heared that unity uses a left-handed coordinate system whereas SRanipal uses right-handed coordinate system so I tried to manipulate the vectors but I still did not manage to achieve it, here is a screenshot of my code ? can I have some directions please ?



Link to comment
Share on other sites

  • 8 months later...


I found the same problem. I think the trouble is in the gaze origin. Gaze direction is expressed as normalized vector, despite origin in mm. Try to normalize the gaze origin. 

Attached you can find the script of SRanipal_eye-v2. As you can see at line 291, the gaze origin is converted in meters. Try to normalize gaze origin, or rather, using gaze origin converted in meter rather than millimeters. 

Hope to be helpful, 



Screenshot (5).png

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...