Browse Source

fix bone color

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

+ 2 - 4
Assets/KinectView/Scripts/BodySourceView.cs

@@ -147,6 +147,8 @@ public class BodySourceView : MonoBehaviour
             lr.startWidth = 0.05f;
             lr.endWidth = 0.05f;
             Material whiteDiffuseMat = new Material(Shader.Find("Sprites/Default"));
+            // TODO: need to test
+            whiteDiffuseMat.color = new Color(1, 1, 1, 0.5f);
             lr.material = whiteDiffuseMat;
 
             jointObj.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
@@ -248,10 +250,6 @@ 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, 1, 1, 0.5f);
-                lr.startColor = boneColor;
-                lr.endColor = boneColor;
             }
             else
             {