Making GameObject move with Skeleton Tracker using XBox 360 Kinect?

hello, I am trying to make an GameObject move with my skeleton using the XBox kinect. I imported the GameObject in a FBX file format. The problem is that it’s not tracking my skeleton in order to make the game object move. Although I have the skeletonTracker code in (C#), along with kinectWrapper code, and many other scripts. I even made a function for the Dll Import that call the KinectWrapper. I still get no results. I am however able to get my gameObject to the screen without it crashing, It just won’t move. Any ideas of what might be going on? Also if possible can code examples be provided. Thanks.

1 Answer

1

wish part of skeleton want it fallow the game object ? you should to know
for me I was want the gameObject fallow my hand then am usually using this code but it not 100% true

void Update () {
KinectManager manager = KinectManager.Instance;

    if (DepthImageViewer.Instance.jointColliders != null)
     {
    if (!isInited)
    {
     isInited = true;
     transform.position = new Vector2(144,104);
     Debug.Log("I moved the cursor the the initial pisition");
    initialPosition = new Vector2((DepthImageViewer.Instance.jointColliders[11].transform.position.x) * 19.2f, (DepthImageViewer.Instance.jointColliders[11].transform.position.y) * ,10.8f);,DepthImageViewer.Instance.jointColliders[11].transform.position.z);
      }

    / Vector2 newPos = new Vector2((DepthImageViewer.Instance.jointColliders[11].transform.position.x) * 19.2f - offstX, (DepthImageViewer.Instance.jointColliders[11].transform.position.y) * 10.8f - offstY) - initialPosition;, DepthImageViewer.Instance.jointColliders[11].transform.position.z) - initialPosition;
    if (newPos.x < 937 && newPos.x > -937 && newPos.y < 520 && newPos.y > -520)
       transform.position = newPos;
    Debug.Log(DepthImageViewer.Instance.jointColliders[11].transform.position);
     }
     else
    {
      Debug.Log("Kinect Do not detect any JointCollider");
    }   

}