[Skeleton tracking] How to get skeleton position relative to the foor?


#1

How can I detect a skeleton joint’s X and Y positions relative to the floor instead at relative to the sensor? I just want to know how much units the user moves to the right or to the left and the distance of a given joint to the floor.

In other words I just want to get a screen X/Y of a given skeleton joint compensating the Z axis.

Thanks in advance.


#2

To get the floor plane, you can use the functions UserFrame::getFloor() and UserFrame::getFloorNormal() (in this case, the floor should be well observed). Having received the Joint.Real coordinates, we can calculate their coordinates relative to a point on the floor plane, which was previously selected.