Jump to content

Unreal Eye Tracking Offset


Recommended Posts

I'm doing some testing with Unreal 4.25 and SRanipal I've calibrated the Eye Tracker, imported the SDK, opened the EyeSample level and gazed at the dartboard sample objects. All works great.

However, when I move away from the level origin (ie 0,0,0), even just a few steps from my desk, I noticed the eye tracking on the dartboards to be very offset, to the point that the gaze is unusable. This is corrected when I step back toward the level origin.

Is this just an issue with the dartboard examples? I don't recall this issue from previous versions of SRanipal, but I don't have the old installers to test. Anyone else noticing this behaviour?

Thanks @MariosBikos_HTC

Link to comment
Share on other sites

  • 3 weeks later...

Just wanted to check in with this. I still don't know if this is intended behaviour. Here's the repro steps:

  1. Install the SDK ( in Unreal Engine 4.25.4
  2. Open the EyeSample level
  3. Walk around a bit and look at things
  4. Notice that the gaze is appears incorrect when you walk away from the origin

Is this the intended behaviour? I would like to know if I should support this or if I'll have to redo some work when the next version drops.


Link to comment
Share on other sites

Hi Marios,

GetGazeData seems to work and that will likely be my preferred method. This GazeData is in local space and needs to be offset and rotated by the PlayerCameraManager's transform to get the Origin and Direction in world space. Is that correct? It seems Focus returns the world space of the hit result, so doing some testing on these dartboards isn't a 1-to-1 change, but not too tricky.

Nice to hear it's just something with the Focus function and not lower level. I can work with that.



Link to comment
Share on other sites

Ah sorry about that @Tomas_TDFM, @C3D let me re-upload the image here. Let me know if it's visible.

What you need to do is go to SRanipal\Source\SRanipalEye\Private\SRanipalEye_Core.cpp file and replace line 337

RayCastDirection = PlayerMainCameraRotation.RotateVector(PlayerMainCameraLocation + CameraGazeDirection * maxDistance);

with the following:

RaycastDirection = (PlayerMainCameraRotation.RotateVector(CameraGazeDirection)*maxDistance) + PlayerMainCameraLocation;


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...