Home Forums Software Development How do i get eyeposition by Unity?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6438
    Matsumoto
    Participant

    Hi.
    I’d like to get eyepositon(x, y, z) by Unity.
    How do i get it?

    #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);
    }
    }
    #6477
    Matsumoto
    Participant

    Thank you for your advice 🙂
    Could you teach me how to do initial setting too.
    Should i write initial setting code in Start()??

    #6480
    Jenny [Tobii]
    Participant

    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 😉

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.