Partial body tracking

Hi, I am working on a Unity game that has to track multiple users and am having some issues.
I want to detect the user’s height without needing to have the user’s feet in the frame so that I can see if the users preformed a squat. Here is the issue I am facing:

    • The floor plane returns with the position of 0. The Y and Z coordinates change based on how close the user is to the camera.
    • The z position of the joint is not an accurate distance from the sensor

Hi Adrian,

It’s difficult to calculate the user’s height if half of the user’s body is not visible,

If you need to detect the squats, you can, for example, check the projective coordinate of the head joint. If it was lower than 0.5 (in height) and then became higher, it means that a person stood up after performing the squat:

if(lastHeadPosY>0.5f && headJoint.Proj.Y < 0.5f)

lastHeadPosY = headJoint.Proj.Y;

We’ve checked this code and it works fine in our case.