Hi Guys, I am working a kinect project and I am beginner in kinect.
I need to match the players current bones orientation with an image (predefined bones orientation).
Can anybody guide?
I have found bonesPos vector array but it seems quite complex…
I found some answer…we can access the bones orientation using SkeletonWrapper class…
e.g. SkeletonWrapper sw; //Assign Kinect Prefab from the inspector
using UnityEngine;
using System.Collections;
public class PrintBonesPos : MonoBehaviour {
private Kinect.KinectInterface kinect;
private Matrix4x4 kinectToWorld;
public SkeletonWrapper sw;
Vector3[] poseMin;
Vector3[] poseMax;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
for(int bone = 0;bone < (int)Kinect.NuiSkeletonPositionIndex.Count; bone++)
{
print("Bone pos for "+bone+" is "+sw.bonePos[0,bone]); //= kinectToWorld.MultiplyPoint3x4(kinect.getSkeleton().SkeletonData[0].SkeletonPositions[bone]);
}
}
}