Hello Comunity,

I am trying to build a c++ Plugin for the Pupil Eyetracking headset. ( GitHub - SysOverdrive/UPupilLabsVR: Plugin for connecting to Pupil Labs VR using the ZeroMQ library wi )

So far I have the relevant data and I am trying to raytrace in a simple VR game the values I receive from the device.

Input data:

I get the x,y positions of the eyes in a 2d plane where (0,0) is the down left corner of a square and (1,1) top right corner. (Normal Floats)

I get multiple values such as (0.5,0.5) center of the field of view or (0.3443,0.34323) left side down etc.

Output

The position of the projected point in the world and a corresponding ray.

Basically I have looked over the mousetoworld examples and other raycasting exemples and could not find any suitable code/linear transformations to be helpfull.

I did try the following by putting togheter some tutorials

x = this->ReceivedGazeStructure->base_data.pupil.norm_pos.x;

y = this->ReceivedGazeStructure->base_data.pupil.norm_pos.y;

const FVector StartTrace = CameraLocation;

const FVector ForwardVector = CameraRotator.Vector();

```
FVector *PlanePoint = new FVector(x, y, 1);
FVector *EndPlanePointTrace = new FVector(); //This should be my endpoint
*EndPlanePointTrace = ((ForwardVector *220.f) + *PlanePoint)
```

Unfortunatly I did not have any luck.

Does anyone have any idea how to implement this.

P.S.: This is already implemented in Unity (the guys who build the device have an open source plugin for their device in Unity )

line 63. I am basically trying to do something simillar to ViewportPointToRay

Kudos in advance ^^.