Having problems trying to track only one person

Hello,
I am currently developing a program on Unity that uses the Nuitrack Body tracking through the Orbbec Astra 2 but i am having difficulties trying to track only one person when there are other people in the same room.
I’ll try to explain in a more detailed way:
so basically everything works fine if i set the max active users as one, activate the autotracking and set the skeleton count to 1 and there is someone in front of the sensor. The problem arises when a second person goes next to the previous one and this one leaves; what i would expect is that the new person would get recognized and tracked as soon as the other leaves, but what happens is that no skeleton gets created and the software doesn’t recognize it until the previous person comes back in camera and leaves again.
It is possible to avoid this if the first person leaves before the second one comes in, basically one at a time, but when there are two at the same time, it doesn’t work.

I tried turning off the autotracking and starting and stopping the tracking by command, but it seems that even then there is some cache where the sensor keeps in memory the previous person; i tried to do as i read in this forum and check if the skeleton id and user id match, but i had no luck.

Is there some solution to this? I saw that there is a Users.cs script that contains some interesting functions that may solve my problem but i couldn’t do much.

Hi @Tora24,

We have not been able to reproduce the behavior you describe. You can see the results of our testing in this video: 2025-04-07 18-05-27.mp4 - Google Drive

Is our test scenario different than yours? Could you please provide more information on how to reproduce this problem? A screen capture would also be helpful.

Thanks.

Hi,

I tried on the AllModulesScene scene and it actually works, the problem is fixed there. However in my own scene and project the problem still occurs, i think it may be because i am using the old SkeletonController.cs and SimpleSkeletonAvatar instead of your UIAvatar and SkeletonsUI.

I’ll try to look at those scripts and update you on the matter, we’ll provide a video of the problem too if I won’t be able to fix it.

Thank you for the big help!

Hello,

After some time trying the AllModulesScene scene i figured out that the Prefab and script working on the Skeleton tracking and visualization is SkeletonVisualization.cs, however i don’t understand why when i activate Nuitrack AI it doesn’t follow anymore the previous settings. For example the test with only one max active user works fine if i keep NuitrackAI off, but it tracks more than one when it is on.
Am i missing/misunderstanding something?

Hi @Tora24,

Sorry for the delay.

Currently, the max active users option is only supported for classic skeleton tracking. But you can implement this filter on your side. If you only need one user, just take a first element from this array: nuitrack-sdk/Examples/nuitrack_csharp_sample/Program.cs at master · 3DiVi/nuitrack-sdk · GitHub

Hello,

Yeah after a couple of days i figured it out, thank you anyway!