Home › Forums › Software Development › How do i get eyeposition by Unity? › Reply To: How do i get eyeposition by Unity?
12/03/2017 at 21:54 #6456
Grant [Tobii]
Keymaster
Hi @matsumoto, this is shown in the eye position demo with unity:
void Update()
{
// Get the last eye position.
var lastEyePosition =
GetComponent<EyePositionDataComponent>().LastEyePosition;
if(lastEyePosition.IsValid)
{
// Get the position of the left eye.
var leftEyePosition = new Vector3(lastEyePosition.LeftEye.X,
lastEyePosition.LeftEye.Y, lastEyePosition.LeftEye.Z);
}
}