Open wirelessdreamer opened 5 years ago
Do you want something like this below?
As long as you clicked on "Save and generate" button from SteamVR Input window, you will be able to assign any input path to it.
Just define a variable as public with corresponding type. public SteamVR_Action_Boolean MyInput;
Does above answering to your question?
Previously wiith VIU we would set a public ViveRoleProperty viveRole; for the role the controller was bound to, and read input with ViveInput.GetPress(viveRole, ControllerButton.Menu);
So it was a 2 part issue, SteamVR defines its own roles now, and we should be able to
Role in SteamVR input sources are defined statically. Currently, we do not know how to modify this part.
Previously we would read in with a command like:
if (ViveInput.GetPressDown(viveRole, ControllerButton.AKey)){ // lets move }
in steamvr 2.0+ we now define a move role![image](https://user-images.githubusercontent.com/140221/50379505-194df800-0619-11e9-854e-d5cc75b8959e.png)
but how do we update our above statement to read from the new role, not a hard coded button? we should be reading from /actions/default/in/Move
SteamVR_Input_Actions contains the new entry:![image](https://user-images.githubusercontent.com/140221/50379525-8a8dab00-0619-11e9-86bc-a7de10247d0e.png)