-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending inputs to another virtual controller instance #13
Comments
Hi, sorry I am not sure what you are trying to achieve here. Can you describe your project more precisely? (Closing as this is apparently a question more than an issue, but feel free to continue the discussion here) |
The script receives data from a udp socket from the game forza horizon 5, the script then calculates the tire slip rate to kill the right trigger input preventing the car from wheel spin (traction control). I have a ds4 controller so I need vgamepad to release the trigger from the ds4windows virtual controller instead of creating a new one. |
Ah I see, I am afraid vgamepad cannot modify the input from your other gamepads sorry. What maybe you could do is capture the input from your actual gamepad and reproduce it in a second (virtual) gamepad created via vgamepad that you would use in forza instead of your actual gamepad, so you could hack the input as much as you like |
I thought because both use the vigem bus driver maybe it was just a matter of specifying the id. anyway thanks for your time |
But the vigembus driver is for emulating gamepads as far as I know, can it also hook real gamepads? |
As I said idk much of coding and how things work but ds4windows uses vigem to create a x360 virtual controller the same as vgamepad, what Im trying to understand is how vgamepad knows which virtual controller is suppose to receive input when there is 2 virtual x360 controllers connected at the same time I'll try to ask in nefarius discord |
I think vigembus gives an index to each attached device, in vgamepad you can retrieve this index with the get_index method, but I suppose that is what you called device ID 0 and 1. I think I understand you want to hook into another virtual device that is already created with vigembus? Not sure whether it is possible at all, but if it is you will probably need to use vigem directly, I don't think vgamepad exposes an API that enables doing that atm. |
Hi, I made a script in python to receive data and send input using vgamepad, the script is working perfectly using keyboard but my intention was that it send inputs to the virtual controller created by ds4windows, I dont know much of coding but from what I noticed both instances have the same hardware ID and the one made by ds4windows is set to xinput id 0 and the one made by vgamepad is set to xinput id 1, could you give me any advice on how I could make it work.
The script is only suppose to simulate the right trigger release sending simulate_right_trigger(0)
The text was updated successfully, but these errors were encountered: