Get position pupil/iris? (Eyetracking)
Dear Lens Studio Community!
I'm testing out if I can track if a user is looking at the top or bottom of the screen.
The normal head/eye binding does not look at the direction or position of the pupil but the eye color effect does.
Is there a way to get the value's of the eye color tracking?
Thanks in advance!
Hey Simon,
It's currently not possible to receive the tracking data for the eyes. That being said, consider adding a face sprite and positioning it to the eye via the dropdown (left or right - both should work). Then you can track the sprite's position to see if it moved up or down (indicating looking up or down).
Cheers,
Kaitlyn
Hi Kaitlyn,
Thanks for the response!
Unfortunately what I would like to do is cross reference the eye tracking with the head tracking so even if the head or the phone moves up or down, the value that the eye tracking gives is consistent.
Is it an idea the do a feature request to be able to reach the same position value's the 'eye color' effect is getting?
Hey Simon,
As for cross referencing with the head, you can add another head binding to the middle of the face and compare the eye positions to that using math like this:
function getLocalOffset(objA, objB){
var trA = objA.getTransform();
var trB = objB.getTransform();
var matrixA = trA.getInvertedWorldTransform();
return matrixA.multiplyPoint(trB.getWorldPosition());
}
But the math does get tricky get cumbersome when you try to make it relative.
In the meantime I can definitely let the engineers know you'd like to track eye position as done in the "eye color" effect and inform when/if this feature is available.
Cheers,
Kaitlyn