Hello there,
I am playing around with Nuitrack in Unity and it’s awesome!
I get all commands about picking positions of joints. But I need “real” head position to point object to look at user face. So it seems like he know where is my face and look direct at my face.
It can be made even easier! Inherit your script from TrackedUser, and redefine the Process method. Take a look at the inspector and you will see that you can easily set up tracking of the current user or user by the specified ID
using UnityEngine;
using NuitrackSDK;
public class UserHead : TrackedUser
{
protected override void Process(UserData userData)
{
if(userData.Skeleton != null)
{
UserData.SkeletonData.Joint headJoint = userData.Skeleton.GetJoint(nuitrack.JointType.Head);
Debug.Log(headJoint.Position); // in meters
}
}
}