- This topic has 3 replies, 3 voices, and was last updated 7 years, 9 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forums › Software Development › How do i get eyeposition by Unity?
Tagged: EyePosition
Hi.
I’d like to get eyepositon(x, y, z) by Unity.
How do i get it?
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);
}
}
Thank you for your advice 🙂
Could you teach me how to do initial setting too.
Should i write initial setting code in Start()??
Sorry @matsumoto,
The demo scene @grant-rogers is referring to is not available in the latest Tobii SDK for Unity. Eye position has been removed. See also other reply to other topics you have created where you have asked the same question 😉