Browse Source

make bone also red for color feedback

Kenkart 2 years ago
parent
commit
9c02933cec

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

@@ -202,8 +202,9 @@ public class BodySourceView : MonoBehaviour
             {
                 if (modeController.feedback == ModeController.Feedback.ColorFeedback)
                 {
-                    // Change to red color
+                    // TODO: Change to red color
                     jointObj.GetComponent<Renderer>().material.color = new Color(1, 0, 0);
+                    jointObj.GetComponent<LineRenderer>().startColor = new Color(1, 0, 0);
                 } else if (modeController.feedback == ModeController.Feedback.HapticFeedback)
                 {
                     // TODO: Add haptic feedback need to test

+ 2 - 0
Assets/Scripts/TriggerDetector.cs

@@ -11,6 +11,7 @@ public class TriggerDetector : MonoBehaviour
         if (other.CompareTag("WristLeft"))
         {
             other.GetComponent<Renderer>().material.color = new Color(1, 1, 1);
+            other.GetComponent<LineRenderer>().startColor = new Color(1, 1, 1);
             BodySourceView bsv = other.GetComponentInParent<BodySourceView>();
             bsv.wristLeftLate = false;
             Visualizer_FadeIn vfi = GetComponentInParent<Visualizer_FadeIn>();
@@ -18,6 +19,7 @@ public class TriggerDetector : MonoBehaviour
         } else if (other.CompareTag("WristRight"))
         {
             other.GetComponent<Renderer>().material.color = new Color(1, 1, 1);
+            other.GetComponent<LineRenderer>().startColor = new Color(1, 1, 1);
             BodySourceView bsv = other.GetComponentInParent<BodySourceView>();
             bsv.wristRightLate = false;
             Visualizer_FadeIn vfi = GetComponentInParent<Visualizer_FadeIn>();

+ 2 - 0
Assets/Scripts/TriggerDetectorSeries.cs

@@ -9,6 +9,7 @@ public class TriggerDetectorSeries : MonoBehaviour
         if (other.CompareTag("WristLeft"))
         {
             other.GetComponent<Renderer>().material.color = new Color(1, 1, 1);
+            other.GetComponent<LineRenderer>().startColor = new Color(1, 1, 1);
             BodySourceView bsv = other.GetComponentInParent<BodySourceView>();
             bsv.wristLeftLate = false;
             Visualizer_FadeInSeries vfi = GetComponentInParent<Visualizer_FadeInSeries>();
@@ -17,6 +18,7 @@ public class TriggerDetectorSeries : MonoBehaviour
         else if (other.CompareTag("WristRight"))
         {
             other.GetComponent<Renderer>().material.color = new Color(1, 1, 1);
+            other.GetComponent<LineRenderer>().startColor = new Color(1, 1, 1);
             BodySourceView bsv = other.GetComponentInParent<BodySourceView>();
             bsv.wristRightLate = false;
             Visualizer_FadeInSeries vfi = GetComponentInParent<Visualizer_FadeInSeries>();