Trigger axis value is always 0
See original GitHub issueAs far as I understood trigger position should be inside of pControllerState as one of the axis.
But when I run this program:
import openvr
openvr.init(openvr.VRApplication_Background)
while True:
print()
result, pControllerState, pTrackedDevicePose = openvr.VRSystem().getControllerStateWithPose(1,
openvr.TrackingUniverseSeated,
)
for i in pControllerState.rAxis:
print(i.x, i.y)
I get only zeroes, am I doing something wrong? (Edit - I had init inside loop)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
changing axis values to become from 0 to 1 instead of [-1,1]
hello everyone I'm using a PS4 controller in my project and i want to use one of the triggers value as an accelerator...
Read more >Input Axis Value ALWAYS 0 - Unreal Engine Forums
Hello, I have a big problem I set up a test to enter a function with a axis map that is set to...
Read more >unity - Input.GetAxis() always returns 0
Here are the fields and properties of my Hand class, in which I am invoking the Input. GetAxis(trigger) method:
Read more >Trigger Button Potential Bug · Issue #155 · ros-drivers ... - GitHub
The trigger buttons seem to map to values between -1 and 1, and after pressing the releasing the trigger button(s) once, the axes...
Read more >Xbox One Right Trigger Not Working - Stack Overflow
It looks like the Left and Right triggers now both use the 3rd axis (Joystick) with the Left generating positive (0 to +1)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had function arguments mixed up. As you can see:
the first one is the tracking universe id, the seconds is the device index and I did it vice versa.
But this function introduced a little lag in posing information, so I don’t use it. You can see minimal example to get axis: https://github.com/mdovgialo/steam-vr-wheel/blob/master/steam_vr_wheel/test.py
I’ve found, that it’s better to get poses like that:
And then get controller state for a controller:
Controller_id can be any number from 0 to 15, so you have to identify controllers using something like this:
These value always remain at 0.0, except for result, that always stay at one, even if the controller is shutdown.
(Windows 10, openvr 1.0.1201)