Get User Joint position in Unity Vector3

Hello!
I’m trying to get the user joint [global] position in Unity Vector3.
For example, to find the User Ankle joint, but inside Unity 3D world.

I can get the 3D model bone position, but I wanted to get the Nuitrack reference.

Hi guilhermesouza,

You can follow this tutorial and it will get explained in great detail.

If you don’t want to read it you can look at the code beneath:

private void Update()
{
    if (CurrentUserTracker.CurrentUser != 0)
    {
        nuitrack.Skeleton skeleton = CurrentUserTracker.CurrentSkeleton;

        nuitrack.Joint joint = skeleton.GetJoint(JointType.LeftAnkle);
        Vector3 leftAnklePosition = 0.001f * joint.ToVector3();
    }
}