コード例 #1
0
ファイル: VRPlayer.cs プロジェクト: brandonmousseau/vhvr-mod
 void maybeUpdateHeadPosition()
 {
     if (VHVRConfig.AllowHeadRepositioning())
     {
         if (Input.GetKeyDown(VHVRConfig.GetHeadForwardKey()))
         {
             updateHeadOffset(new Vector3(0f, 0f, 0.1f));
         }
         if (Input.GetKeyDown(VHVRConfig.GetHeadBackwardKey()))
         {
             updateHeadOffset(new Vector3(0f, 0f, -0.1f));
         }
         if (Input.GetKeyDown(VHVRConfig.GetHeadLeftKey()))
         {
             updateHeadOffset(new Vector3(-0.1f, 0f, 0f));
         }
         if (Input.GetKeyDown(VHVRConfig.GetHeadRightKey()))
         {
             updateHeadOffset(new Vector3(0.1f, 0f, 0f));
         }
         if (Input.GetKeyDown(VHVRConfig.GetHeadUpKey()))
         {
             updateHeadOffset(new Vector3(0f, 0.1f, 0f));
         }
         if (Input.GetKeyDown(VHVRConfig.GetHeadDownKey()))
         {
             updateHeadOffset(new Vector3(0f, -0.1f, 0f));
         }
     }
 }