|
@@ -75,24 +75,28 @@ public class BodyComparer : MonoBehaviour
|
|
|
|
|
|
if (distance > 0.15f)
|
|
|
{
|
|
|
- body.GetChild((int)jt).GetComponent<Renderer>().material.color = Color.red;
|
|
|
-
|
|
|
- // TODO: Haptic feedback
|
|
|
- if (jt == Kinect.JointType.WristLeft)
|
|
|
- {
|
|
|
- SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.LeftHand].Execute(0, 0.01f, 10, 1);
|
|
|
- }
|
|
|
- else if (jt == Kinect.JointType.WristRight)
|
|
|
+ if (mc.feedback == ModeController.Feedback.ColorFeedback)
|
|
|
{
|
|
|
- SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.RightHand].Execute(0, 0.01f, 10, 1);
|
|
|
- }
|
|
|
- else if (jt == Kinect.JointType.AnkleLeft)
|
|
|
- {
|
|
|
- SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.LeftFoot].Execute(0, 0.01f, 10, 1);
|
|
|
- }
|
|
|
- else if (jt == Kinect.JointType.AnkleRight)
|
|
|
+ body.GetChild((int)jt).GetComponent<Renderer>().material.color = Color.red;
|
|
|
+ } else if (mc.feedback == ModeController.Feedback.HapticFeedback)
|
|
|
{
|
|
|
- SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.RightFoot].Execute(0, 0.01f, 10, 1);
|
|
|
+ // TODO: Haptic feedback
|
|
|
+ if (jt == Kinect.JointType.WristLeft)
|
|
|
+ {
|
|
|
+ SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.LeftHand].Execute(0, 0.01f, 10, 1);
|
|
|
+ }
|
|
|
+ else if (jt == Kinect.JointType.WristRight)
|
|
|
+ {
|
|
|
+ SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.RightHand].Execute(0, 0.01f, 10, 1);
|
|
|
+ }
|
|
|
+ else if (jt == Kinect.JointType.AnkleLeft)
|
|
|
+ {
|
|
|
+ SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.LeftFoot].Execute(0, 0.01f, 10, 1);
|
|
|
+ }
|
|
|
+ else if (jt == Kinect.JointType.AnkleRight)
|
|
|
+ {
|
|
|
+ SteamVR_Actions.default_Haptic[SteamVR_Input_Sources.RightFoot].Execute(0, 0.01f, 10, 1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|