csca Posted September 20, 2019 Share Posted September 20, 2019 Hey, I have implemented a basic scene for head and controller tracking for the Vive Focus Plus. For the controllers I have created 2 gameobjects and attached the WaveVR_DevicePoseTracker and WaveVR_ControllerPoseTracker scripts. I have added the WaveVR_ButtonList Scripts to antoher game object and registered the trigger and grip buttons for both controllers. When I try to get information about button presses with this script: public class WaveVR_ControllerDebug : MonoBehaviour { public List<string> states; private WaveVR_Controller.Device controllerLeft; private WaveVR_Controller.Device controllerRight; // Start is called before the first frame update void Start() { controllerLeft = WaveVR_Controller.Input(WaveVR_Controller.EDeviceType.NonDominant); controllerRight = WaveVR_Controller.Input(WaveVR_Controller.EDeviceType.Dominant); } // Update is called once per frame void Update() { states.Clear(); foreach(WaveVR_ButtonList.EButtons button in Enum.GetValues(typeof(WVR_InputId))) { states.Add(button + " " + controllerRight.GetPress(button)); states.Add(button + " " + controllerLeft.GetPress(button)); } } } it will show all button presses as type Unavailable (0) when running direct preview. It also shows InputId as 0 for all button presses in the log. Am I missing scripts to make this work? Or is there a more reliable way to grab controller presses? I need to keep the controller integration as simple and minimal as possible. @Tony PH Lin @Cotta Link to comment Share on other sites More sharing options...
Fangh Posted September 24, 2019 Share Posted September 24, 2019 I manage to get the Touchpad by doing this : controllerRight.GetPressDown(WaveVR_ButtonList.EButtons.Touchpad) but controllerRight.dominantController.GetPressDown(WaveVR_ButtonList.EButtons.Menu) and controllerRight.GetPressDown(wvr.WVR_InputId.WVR_InputId_Alias1_Trigger) and controllerRight.GetPressDown(WaveVR_ButtonList.EButtons.Trigger) doesn't seems to work. @Tony PH Lin @Cotta Link to comment Share on other sites More sharing options...
Tony PH Lin Posted October 3, 2019 Share Posted October 3, 2019 Hi @csca, @Fangh, Sorry for late reply. Since we refine button event architectures separated into prefab WaveVRButtons from SDK 3.0. Please revisit below page to get more detail descriptions how to get the button event. Thanks. https://hub.vive.com/storage/app/doc/en-us/HowToGetButtonEvent.html https://hub.vive.com/storage/app/doc/en-us/WaveVR_ButtonList.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now