|
@@ -156,8 +156,10 @@ public class PlayerReplay : MonoBehaviour
|
|
GameObject body = new GameObject("Recorded Body " + i);
|
|
GameObject body = new GameObject("Recorded Body " + i);
|
|
for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++)
|
|
for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++)
|
|
{
|
|
{
|
|
-
|
|
+
|
|
- if (jt == Kinect.JointType.Head)
|
|
+ if (jt == Kinect.JointType.Head || jt == Kinect.JointType.ThumbLeft || jt == Kinect.JointType.ThumbRight
|
|
|
|
+ || jt == Kinect.JointType.HandLeft || jt == Kinect.JointType.HandRight
|
|
|
|
+ || jt == Kinect.JointType.HandTipLeft || jt == Kinect.JointType.HandTipRight)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
|
|
@@ -165,10 +167,10 @@ public class PlayerReplay : MonoBehaviour
|
|
LineRenderer lr = jointObj.AddComponent<LineRenderer>();
|
|
LineRenderer lr = jointObj.AddComponent<LineRenderer>();
|
|
lr.positionCount = 2;
|
|
lr.positionCount = 2;
|
|
lr.material = boneMaterial;
|
|
lr.material = boneMaterial;
|
|
- lr.startWidth = 0.3f;
|
|
+ lr.startWidth = 0.05f;
|
|
- lr.endWidth = 0.3f;
|
|
+ lr.endWidth = 0.05f;
|
|
|
|
|
|
- jointObj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
|
|
+ jointObj.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
|
|
jointObj.name = jt.ToString();
|
|
jointObj.name = jt.ToString();
|
|
JointsData jd = newJointsData[i];
|
|
JointsData jd = newJointsData[i];
|
|
jointObj.transform.position = new Vector3(jd.jointsPositionsX[(int)jt], jd.jointsPositionsY[(int)jt], jd.jointsPositionsZ[(int)jt]);
|
|
jointObj.transform.position = new Vector3(jd.jointsPositionsX[(int)jt], jd.jointsPositionsY[(int)jt], jd.jointsPositionsZ[(int)jt]);
|
|
@@ -178,8 +180,11 @@ public class PlayerReplay : MonoBehaviour
|
|
|
|
|
|
for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++)
|
|
for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++)
|
|
{
|
|
{
|
|
-
|
|
+
|
|
- if (!_BoneMap.ContainsKey(jt) || jt == Kinect.JointType.Neck)
|
|
+ if (!_BoneMap.ContainsKey(jt) || jt == Kinect.JointType.Neck
|
|
|
|
+ || jt == Kinect.JointType.ThumbLeft || jt == Kinect.JointType.ThumbRight
|
|
|
|
+ || jt == Kinect.JointType.HandLeft || jt == Kinect.JointType.HandRight
|
|
|
|
+ || jt == Kinect.JointType.HandTipLeft || jt == Kinect.JointType.HandTipRight)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
Transform jointObj = body.transform.Find(jt.ToString());
|
|
Transform jointObj = body.transform.Find(jt.ToString());
|
|
@@ -229,7 +234,12 @@ public class PlayerReplay : MonoBehaviour
|
|
} else
|
|
} else
|
|
{
|
|
{
|
|
waitTime += 3;
|
|
waitTime += 3;
|
|
-
|
|
+
|
|
|
|
+
|
|
|
|
+ StartCoroutine(Visualize(jointsDataSeries, recordingTimesSeries));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
Visualizer_FadeInSeries body = Instantiate(vfis) as Visualizer_FadeInSeries;
|
|
Visualizer_FadeInSeries body = Instantiate(vfis) as Visualizer_FadeInSeries;
|
|
body.transform.parent = gameObject.transform;
|
|
body.transform.parent = gameObject.transform;
|
|
body.SetData(jointsDataSeries, recordingTimesSeries);
|
|
body.SetData(jointsDataSeries, recordingTimesSeries);
|