Open RobawesomeVR opened 6 years ago
Joy2OpenVR is agnostic to controllers, but uses OpenVR Input Emulator, so the game must use OpenVR and not Oculus SDK
If Input Emulator works in a particular game (ie. changing controller offset), Joy2OpenVR should works
Thanks, I only had time to try with Cyber Threat, and the Steamvr interface. Input emulator worked for setting the offsets, and I could see that Joy2OpenVR was receiving input from the controller but nothing was getting passed on to Steamvr. The Oculus controllers worked fine on their own, all button presses worked.
My program is only an interface to Input Emulator command line tool, so, for example, to press the grip button on controller id #1 it does:
client_commandline.exe buttonevent pressandhold 1 2
where 1 is controller ID and 2 is the grip button id as listed in
https://github.com/ValveSoftware/openvr/blob/master/headers/openvr.h#L727-L754
trigger and trackpad are axes, so it's a bit different, but still simple. Here you can find some usefull batch for testing.
Maybe Oculus uses different ID mapping? I don't own an Oculus Rift for testing, but if someone find the right syntax I should fix the program. If @matzman666 could read this, he could help us
Thanks so much! I won't be able to try this out until Monday, but I can't wait! Keep up the great work!
Ok, I have worked on this for a while and this is what I have found. Using the attached oculus.ini file (My device ID's are 5 (left) and 6 (right) because I have 4 Rift sensors) here is what happens. Pressing the trigger on the Top Shot isn't consistent. When it does work, it is seemingly only sending a single press, because fully automatic weapons (tested with Cyber Threat) only fire a single shot. The thumb sticks are having a similar issue, when pushed in a direction, the character just "steps" once. I need to re-center the stick and push again. Pressing down on the thumb stick click works (teleport in Cyber Threat). Menu button, system button working they bring up game menu, system menu respectively. p.s. I have 4 Cabela top shot elite controllers now! One for my Rift, one for the original Vive, on for my Vive Pro, and one to tinker with! oculus.txt Thanks for any help you can provide! and thanks to @matzman666 too!
The trigger should act as the real trigger: when you press the topshot one, the SteamVR controller trigger is pressed and held, when you release it the SteamVR trigger is released.
This problem only occurs when you play with Oculus Touch?
Did you try the scripts attached to the previous message? The touch thumbstick may need different commands sequence from the Vive Trackpad, but I don't know how to test it.
BTW, how do you track the gun, with Oculus?
You are correct, the trigger works fine with Vive but not Rift. I have yet to use your scripts, what is the best way to try them out? Should I just run them from a command line or setup an Autohotkey/Joytokey to trigger them? You are also correct about the tracking, I just attached a touch controller to the top of the Top Shot (currently with Velcro straps-not very stable) and set some offsets. Thanks!
Simply execute them and look what happens. Edit config.bat with controller ID
This is just for testing, those scripts are very simple, take a look at trackpad-up-press.bat
client_commandline.exe buttonevent touchandhold %ctrlid% 32
client_commandline.exe axisevent %ctrlid% 0 0.0 1.0
client_commandline.exe buttonevent pressandhold %ctrlid% 32
means:
a thumbstick is different from a trackpad, What could be the correct sequence, assuming the Input Emulator can correctly handle the touch? I don't know, as I don't own the touch, But you could do some tests
possible commands are:
buttonevent
buttonevent [press|pressandhold|unpress|touch|touchandhold|untouch] <openvrId> <buttonId> [<pressTime>]
axisevent
axisevent <openvrId> <axisId> <x> <y>
Tried with my Oculus touch and did not seem to work. Are there some syntax changes to the ini file that need to be done, or is the Touch not supported? I love to have multiplayer and it would be great if I could level the playing field between Team Oculus and Team Vive!
Thanks again for everything!