Browse Source

Update BodySourceView.cs

Kenkart 2 years ago
parent
commit
3638a79796
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Assets/KinectView/Scripts/BodySourceView.cs

+ 5 - 5
Assets/KinectView/Scripts/BodySourceView.cs

@@ -121,8 +121,8 @@ public class BodySourceView : MonoBehaviour
             lr.positionCount = 2;
             lr.material = BoneMaterial;
             //lr.SetWidth(0.05f, 0.05f);
-            lr.startWidth = 0.5f;
-            lr.endWidth = 0.5f;
+            lr.startWidth = 0.3f;
+            lr.endWidth = 0.3f;
 
             jointObj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
             jointObj.name = jt.ToString();
@@ -147,17 +147,17 @@ public class BodySourceView : MonoBehaviour
             Transform jointObj = bodyObject.transform.Find(jt.ToString());
             jointObj.localPosition = GetVector3FromJoint(sourceJoint);
 
-            // Make head joint invisible (need to test)
+            // Make head joint invisible
             jointObj.GetComponent<Renderer>().enabled = false;
 
             // Make camera follow the head
             if (jt == Kinect.JointType.Head)
             {
-                cameraRig.localPosition = new Vector3(jointObj.localPosition.x, jointObj.localPosition.y - 1, jointObj.localPosition.z);
+                cameraRig.localPosition = new Vector3(jointObj.localPosition.x, jointObj.localPosition.y - 3, jointObj.localPosition.z + 2);
             }
 
             LineRenderer lr = jointObj.GetComponent<LineRenderer>();
-            if (targetJoint.HasValue && targetJoint != body.Joints[_BoneMap[Kinect.JointType.Head]]) // (need to test)
+            if (targetJoint.HasValue && jt != Kinect.JointType.Neck)
             {
                 lr.SetPosition(0, jointObj.localPosition);
                 lr.SetPosition(1, GetVector3FromJoint(targetJoint.Value));