Esempio n. 1
0
 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));
         }
     }
 }