SteamVR Plugin2.2.0获取手柄按键

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
using Valve.VR.Extras;
using Valve.VR.InteractionSystem;

public class LaserPointer_Chh : MonoBehaviour
{
    /// 
    /// 什么类型的按键 
    /// 
    public SteamVR_Action_Boolean disk;
    void Start()
    {


    }

    void Update()
    {
        //SteamVR_Input_Sources.RightHand 只获取右手的
        if (disk.GetStateDown(SteamVR_Input_Sources.RightHand))
        {
            Debug.Log("dddddd");
        }
    }
}

 

你可能感兴趣的:(unity)