I am trying to get the Viewport-Space coordinates of the eye gaze, to apply some post-process calculations depending on where the user is looking.
Basically I want to get (0.5, 0.5) for both eyes if the user is looking straight forward, (0.0,0.0) if he is looking in the upper left corner, (1.0, 1.0) if he is looking in the lower right corner...
To do that I added the eye positions to the gaze and converted the resulting world-coordinate vectors to screen space, but the results are not what I expected. They range from -5000 to +30000.
I am working with the Unreal Engine btw, attached you can find a screenshot of the blueprint function I am using.
Any Idea on how to do this?
Please sign in to leave a comment.