openvr
openvr copied to clipboard
Does GetControllerState works now?
I was trying with pyopenvr(https://github.com/cmbruns/pyopenvr) to receive controller input information, using IVRSystem::GetControllerState https://github.com/ValveSoftware/openvr/wiki/IVRSystem::GetControllerState
running the sample from https://gist.github.com/awesomebytes/75daab3adb62b331f21ecf3a03b3ab46
I was successful in retrieving the pose of the controller with 'getDeviceToAbsoluteTrackingPose' https://github.com/ValveSoftware/openvr/wiki/IVRSystem::GetDeviceToAbsoluteTrackingPose
but in case of getting the button inputs, the structs always seems to returing empty information. When I checked the 'unPacketnum' of the getControllerState returning struct, it always returns '0' which means no event from the controller was detected.
Can there be anything I am doing wrong, or can the GetControllerState somehow is not working for now?
We are also having the same trouble, we are trying to get 4 controllers to work within one steam vr instance + unity scene. 2 for a user and 2 for an actor. We weren't able to get this working ethier, it may be depreciated
If IVRSystem methods are slowly being phased out, I would need to manage with the new openvr input systems in IVRInput.
Which means I should look for IVRInput examples to get controller inputs, but haven't stumbled upon any.. (New input system is much harder to figure out since I am accessing openvr directly without using Unity)
I would like to know what method I should look for in IVRInput to gain access to controller inputs.
(I am trying to access inputs with steamVR + (c++ or python script only). Not using c# or Unity steamVR plugin at all)
https://github.com/ValveSoftware/openvr/wiki/SteamVR-Input
@gitscade https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/tree/master/src/openvr for an example, we don't use any analog actions yet but should give you more or less the idea.
My experience has been if you use ANY of the new input features, All the deprecated methods do not work.
But you don't really have controller States now, Its more the "action states" and you jsut distribute key-bindings for those actions to a controller....
But in terms of the "states" of the actions you are looking at the ActionData structs.
And the functions would be GetDigitalActionData and related
@gitscade Try https://github.com/username223/SteamIVRInput-Cpp-Example
Is there any updates on this bug? We're interested in getting the basic tracking info, but do not want the complications of using the new IVRInput system.
Is there any plan to patch this bug? If not, is there a previous version of the library we can use, which properly implements the old API's?
My experience has been if you use ANY of the new input features, All the deprecated methods do not work.
That's definitely the case. The old API is now implemented in terms of the new one, so it doesn't function unless the app is completely a legacy app.
As long as you never call SetActionManifestPath in your app the old system should still be working fine. Thousands of games are still using it. What is failing for you specifically?
Ah, thanks Joel, we are just starting to dig in. I didn't realize we could just operate in legacy mode. That works!
My app does call SetActionManifestPath and the majority of my game depends on action bindings, however is it possible to know the state of the triangle button on Vive trackers without needing to assign bindings? Currently there are only Keyboard or Camera roles so I am not able to have more than two trackes with functional trigger buttons; asking customers to assign trackers as Keyboard/Camera role for using as firearm prop is causing a lot of confusion. Can the state of the triangle button for any Vive tracker be determined in a Unity game where SetActionManifestPath has been set?
know the state of the triangle button on Vive trackers without needing to assign bindings?
Assigning Bindings is the correct Method afaik.
and you can always know where the action is coming from using VRInputValueHandle_t .
Worst case you should be able to assign the trackers to whatever role you want via your app (afaik the roles are just aliases for the trackers to be treated as different "controllers")