Home Forums Software Development Get the Head Positions Reply To: Get the Head Positions

Grant [Tobii]

Hi @wrapcaesar and thanks for your query. Before proceeding, it is important to stress that when using the Tobii 4C in conjunction with the Core SDK for the long term storage of any gaze data for analysis purposes, this requires the purchase of special analytical use licence.

You can read more about this @ https://analyticaluse.tobii.com/

If however your data is purely used for interaction purposes, then no further action is required. It would be useful to hear about your project intentions going forward.

That being said, The issue in your code is due to assigning a double variable to PosY & PosZ which are of the form Vector 3.

Please find below a simple code to illustrate a more appropriate methodology.

using System;
using Tobii.Interaction;

namespace ConsoleApp2
    class Program
        static void Main(string[] args)
                var host = new Host();
                var headPoseStream = host.Streams.CreateHeadPoseStream();

                headPoseStream.HeadPose((headPosX, headPosY, headPosZ) => AddList(headPosX,headPosY,headPosZ));

       static void AddList(double _headPosX, Vector3 _headPosY, Vector3 _headPosZ)
            //add to list element

You should be able to modify this to suit your needs. Of course you will need to convert the PosY and PosZ format and concatenate with PosX to add to a double format list.

Please let us know if we can be of any further assistance. Best Wishes.