|
@@ -7,7 +7,7 @@ public class PlayerReplay : MonoBehaviour
|
|
{
|
|
{
|
|
// Joints already given the values from BodySourceView.cs that keeps updating
|
|
// Joints already given the values from BodySourceView.cs that keeps updating
|
|
public Transform[] joints = new Transform[25];
|
|
public Transform[] joints = new Transform[25];
|
|
- public List<Transform[]> jointsSequence = new List<Transform[]>();
|
|
|
|
|
|
+ public List<Vector3[]> jointsSequence = new List<Vector3[]>();
|
|
public Material boneMaterial;
|
|
public Material boneMaterial;
|
|
|
|
|
|
private Dictionary<Kinect.JointType, Kinect.JointType> _BoneMap = new Dictionary<Kinect.JointType, Kinect.JointType>()
|
|
private Dictionary<Kinect.JointType, Kinect.JointType> _BoneMap = new Dictionary<Kinect.JointType, Kinect.JointType>()
|
|
@@ -45,12 +45,14 @@ public class PlayerReplay : MonoBehaviour
|
|
public void AddJoints()
|
|
public void AddJoints()
|
|
{
|
|
{
|
|
// TODO: still not working, all elements are replaced with new added array
|
|
// TODO: still not working, all elements are replaced with new added array
|
|
- jointsSequence.Add(joints);
|
|
|
|
|
|
+ Vector3[] positions = new Vector3[25];
|
|
|
|
|
|
- foreach(Transform[] t in jointsSequence)
|
|
|
|
|
|
+ for(int i = 0; i < joints.Length; i++)
|
|
{
|
|
{
|
|
- Debug.Log("debug: " + t[0].position);
|
|
|
|
|
|
+ positions[i] = joints[i].position;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ jointsSequence.Add(positions);
|
|
}
|
|
}
|
|
|
|
|
|
public void Save()
|
|
public void Save()
|