Lock another skeleton

Hi ad,
I have a question: when I detected a skeleton, I want to lock this skeleton and just get data from this skeleton. Although when camera detected multiple skeletons and callback list data from those skeleton, but list data will change as distance of skeleton position and camera.
So nuitrack can lock skeleton which we want?

Hello Toan Le!

If you need to identify only one active user, then you can use CurrentUserTracker.

Example:

    void Update()
    {
        if (CurrentUserTracker.CurrentSkeleton != null)
            ProcessSkeleton(CurrentUserTracker.CurrentSkeleton);
    }

    void ProcessSkeleton(nuitrack.Skeleton skeleton)
    {
        /*
         * Your arbitrary code
         * ...
         */
    }

Nuitrack stores the ID of each detected skeleton between frames, regardless of the distance to the sensor.

1 Like