Example #1
0
 public static void UpdateObjectives(string mainObj, string subObj)
 {
     if (objectiveDisplay != null)
     {
         objectiveDisplay.text = "WARDEN OBJECTIVE: \n \n " + mainObj + "\n \n " + subObj;
         VRInput.TriggerHapticPulse(0.01f, 1 / .025f, 0.2f, Controllers.GetDeviceFromType(Controllers.offHandControllerType));
     }
 }
Example #2
0
 public void SwitchState()
 {
     if (currentState.Equals(WatchState.Inventory))
     {
         SwitchState(WatchState.Objective);
     }
     else
     {
         SwitchState(WatchState.Inventory);
     }
     VRInput.TriggerHapticPulse(0.025f, 1 / .025f, 0.3f, Controllers.GetDeviceFromType(Controllers.offHandControllerType));
 }
Example #3
0
    public void TriggerVibFeedback(ushort msec)
    {
        if (VRGloveInput != null)
        {
            VRGloveInput.GetComponent <VRTRIXGloveAgent>().Vibrate();
            return;
        }

        if (VRInput != null)
        {
            VRInput.TriggerHapticPulse(msec);
        }
    }
Example #4
0
        void Update()
        {
            bool isInDoubleHandPos = false;

            if (PlayerVR.LoadedAndInGame)
            {
                VRWeaponData itemData = WeaponArchetypeVRData.GetVRWeaponData(ItemEquippableEvents.currentItem);
                if (itemData.allowsDoubleHanded)
                {
                    bool wasAimingTwoHanded = aimingTwoHanded;
                    isInDoubleHandPos = AreControllersInDoubleHandedPosition();

                    if (!aimingTwoHanded && !wasInDoubleHandPosLastFrame && isInDoubleHandPos)
                    {
                        VRInput.TriggerHapticPulse(0.025f, 1 / .025f, 0.3f, GetDeviceFromType(offHandControllerType));
                    }

                    if (aimingTwoHanded)
                    {
                        aimingTwoHanded = !AreControllersOutsideOfDoubleHandedAimingRange();
                        if (wasAimingTwoHanded && !aimingTwoHanded)
                        {
                            VRInput.TriggerHapticPulse(0.025f, 1 / .025f, 0.3f, GetDeviceFromType(offHandControllerType));
                        }
                    }
                    else
                    {
                        aimingTwoHanded = AreControllersInDoubleHandedPosition();
                    }
                }
                else
                {
                    aimingTwoHanded = false;
                }
                wasInDoubleHandPosLastFrame = isInDoubleHandPos;
            }
        }