hi, how would you alter tinkeres wrapper, to allow the skeleton to move by leaning forward?
I guess you could if you tied the forward translation to the angle of the spine. I dunno, I have a problem with spacial lateral movement with the Kinect. I just don’t know what’s the best way to handle it.
I came up with the same solution, it works when the script is applied to a cube or sphere. However i cannot move the skeleton, anyone have any suggestions?
did either of you get an error when installing about not being able to connect module to the OpenNI?
TheRaider , refer to the GoogleGroup OpenNI for problems installing. They have a lot of information. Not saying you can’t ask here, just that it is easier to get answers
.
thanks i will have a look at it. I would love to get it working.
Heres the script:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public Transform sphere1;
public Transform sphere2;
public float diffx;
public float diffz;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
diffx= sphere1.position.x - sphere2.position.x;
diffz= sphere1.position.z - sphere2.position.z;
}
}
using UnityEngine;
using System.Collections;
public class Leandirection : MonoBehaviour {
public NewBehaviourScript lean;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Translate(lean.diffxTime.deltaTime, lean.diffzTime.deltaTime, 0);
}
}
Retrieve the position of the head, compare that to the pelvis(Z-axis) if the diffrence > threshold then start moving forwards.
thanks