Browse Source

make body transparent and remove neck if first person view

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

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

@@ -195,6 +195,7 @@ public class BodySourceView : MonoBehaviour
                 if (modeController.perspective == ModeController.Perspective.FirstPersonPerspective)
                 {
                     cameraRig.localPosition = new Vector3(jointObj.localPosition.x, jointObj.localPosition.y, jointObj.localPosition.z - 0.03f);
+                    jointObj.GetComponent<Renderer>().enabled = false;
                 }
                 else
                 {
@@ -247,6 +248,10 @@ public class BodySourceView : MonoBehaviour
                 //lr.SetColors(GetColorForState(sourceJoint.TrackingState), GetColorForState(targetJoint.Value.TrackingState));
                 //lr.startColor = GetColorForState(sourceJoint.TrackingState);
                 //lr.endColor = GetColorForState(targetJoint.Value.TrackingState);
+                // TODO: need to test
+                Color boneColor = new Color(1, 0, 0, 0.5f);
+                lr.startColor = boneColor;
+                lr.endColor = boneColor;
             }
             else
             {