- This topic has 3 replies, 2 voices, and was last updated 3 years, 3 months ago by Grant [Tobii].
- 01/12/2019 at 12:38 #12387AnsamParticipant
I have Tobii Eyetracker 4c PN_12004648.
And I would like to work on using the eye tracker for tracking the gaze and Head pose (not important to me to sort the position data).
Could you guide me please from where can I start working on tracking the head pose in UNITY and do some action when the head point gets into some object? I am a beginner in using Unity
Thank you!02/12/2019 at 14:35 #12390Grant [Tobii]Keymaster
Hi @ayaataya and thank you for your interest in developing Unity Applications with your Tobii 4C!
As you are new to Developing, then we would suggest you first of all take a look at our introductory video to the Unity SDK @ https://www.youtube.com/watch?v=O-yEwaJc68U
Thereafter, we have created an extensive getting started guide to get up and running quickly @ https://tobii.github.io/UnitySDK/manual#getting-started
With details on capturing the head position data @ https://tobii.github.io/UnitySDK/manual#head-pose-data
Please do go through these and let me know how you get on. Best Wishes.11/12/2019 at 07:05 #12458AnsamParticipant
Thank you for your reply. Currently, in the “ChangeColor” script I want to make the highlight condition based on not only the gaze focus but also with the Head focus at the same time.
I tried to make it based on yaw and pitch values but it doesn’t work properly so I want to make it when “the gaze and the head position on the object–> Highlight the object”.
yaw = headmovement.yawvalue;///////////
pitch = headmovement.pitchvalue; ////////////
if (_meshRenderer.material.color != _lerpColor)
_meshRenderer.material.color = Color.Lerp(_meshRenderer.material.color, _lerpColor, _fadeSpeed);
// Change the color of the cube
if (_gazeAwareComponent.HasGazeFocus == true && yaw >= -50 && pitch>=-20) ////////
One more thing please, How could I indicate the current head position by a small point like in case of gaze point?13/12/2019 at 13:45 #12476Grant [Tobii]Keymaster
Hi @ayaataya, there is no precise means by which we map the head position to screen position but you could take the following example as an approximate guide that should hopefully point you in the right direction.
Take for instance you have a screen of resolution 1280 x 720 and you are trying to get the estimated (x,y) of gaze on screen based on the head movement variables:
x: yaw (-45 deg) = 0 , yaw (+45 deg) =1280
y: pitch (-45 deg) = 0 , pitch (45 deg) = 720
Of course, this is necessarily rather rough but it should allow you to combine with gaze data, although it’s not clear why you would need this as the gaze location will be reliable regardless if the head rotation ‘agrees’ with it or not.
However, hopefully the above tip should be what you are looking for! Best Wishes 🙂
- You must be logged in to reply to this topic.