Skip to content

Commit

Permalink
Harder to accidentally load level from menu
Browse files Browse the repository at this point in the history
...by requiring the player to squeeze the trigger slightly more, to avoid loading a level by barely grazing the trigger.
  • Loading branch information
ddabble committed Feb 22, 2018
1 parent d08b9b6 commit bd6d8b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Scripts/SelectLevel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using UnityEngine;
using UnityEngine.SceneManagement;
using Valve.VR;
using Valve.VR.InteractionSystem;

[RequireComponent(typeof(Interactable))]
Expand All @@ -20,7 +21,7 @@ void OnHandHoverBegin(Hand hand)

void HandHoverUpdate(Hand hand)
{
if (hand.GetStandardInteractionButton())
if (hand.controller.GetPressDown(EVRButtonId.k_EButton_SteamVR_Trigger))
{
if (!isLoadingLevel)
{
Expand Down

0 comments on commit bd6d8b4

Please sign in to comment.