コード例 #1
0
ファイル: SpellInput.cs プロジェクト: 1ByteMemory/SpellDemo
 public void HandActionChange(SteamVR_Action_Boolean actionIn, SteamVR_Input_Sources inputSource, bool newValue)
 {
     if (actionIn.GetPath() == actionLeftGrip.GetPath())
     {
         //Debug.Log("lg: " + newValue);
         isLPalmOpen = !newValue;
     }
     else if (actionIn.GetPath() == actionLeftPinch.GetPath())
     {
         //Debug.Log("lp: " + newValue);
         isLIndexOpen = !newValue;
     }
     else if (actionIn.GetPath() == actionRightGrip.GetPath())
     {
         //Debug.Log("rg: " + newValue);
         isRPalmOpen = !newValue;
     }
     else if (actionIn.GetPath() == actionRightPinch.GetPath())
     {
         //Debug.Log("rp: " + newValue);
         isRIndexOpen = !newValue;
     }
 }