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:
publicclassWaveVR_ControllerDebug:MonoBehaviour{publicList<string> states;privateWaveVR_Controller.Device controllerLeft;privateWaveVR_Controller.Device controllerRight;// Start is called before the first frame updatevoidStart(){
controllerLeft =WaveVR_Controller.Input(WaveVR_Controller.EDeviceType.NonDominant);
controllerRight =WaveVR_Controller.Input(WaveVR_Controller.EDeviceType.Dominant);}// Update is called once per framevoidUpdate(){
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.
Wave SDK 3.1.1 Unity not receiving correct controller InputIds with Focus Plus
in VIVE Wave SDK
Posted
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:
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