matzman666 / OpenVR-InputEmulator

An OpenVR driver that allows to create virtual controllers, emulate controller input, manipulate poses of existing controllers and remap buttons. A client-side library that communicates with the driver via shared-memory is also included.
GNU General Public License v3.0
716 stars 138 forks source link

Feature Request: Add gamepad support #13

Open wirelessdreamer opened 7 years ago

wirelessdreamer commented 7 years ago

reading input from a usb gamepad (like the top shot elite controller) to emulate stuff like the touchpad would add a lot of flexibility to the system

here is a link to one of the controllers:

https://www.amazon.com/Cabelas-Top-Shot-Elite-Firearm-Controller/dp/B004FDYTI2/ref=pd_lpo_sbs_63_t_2?_encoding=UTF8&refRID=0CE7BCRARNWZ3SBHW9MB&th=1

EVOL-LOVE commented 6 years ago

Yes please add this feature. It would be awesome to send input from VR treadmills back into the motion controllers. Please also support XInput and DirectInput as for example the Virtuix Omni is a DirectInput device. I do not know about Katwalk but I assume it is DirectInput as well.

mmorselli commented 6 years ago

@wirelessdreamer If you're still interested, I just got this working, a top shot elite with Vive Tracker, but can also work with a controller on top

you need:

script:

trigger.bat (put in the Command-Line Client folder)

client_commandline.exe axisevent 3 1 1 0
client_commandline.exe axisevent 3 1 0 0

change "3" with your controller ID

topshot2openvr.ahk (AutoHotKey script, put in the Command-Line Client folder)

#NoEnv  
SendMode Input  
SetWorkingDir %A_ScriptDir%  
f::
Process, Exist, client_commandline.exe
If Not ErrorLevel
    Run trigger.bat,,hide
return

assuming "f" as the key associated with the trigger in JoyToKey

works flawlessly with zero lag

here you can find a 3D Print file of a Vive controller mount https://www.thingiverse.com/thing:2633912

Of course, integrated support of XInput in OpenVR-InputEmulator would be a lot better

topshotelite