Page 2 of 2

Re: Vive controller emulation using an Xbox controller

Posted: Thu Dec 29, 2016 7:20 am
by olistreet
Hi guys, would it be possible to use the cabela top shot elite gun ,wich is a xbox controller, attached with an oculus touch in Doom 3 BFG VR MOD by Samson:

https://www.youtube.com/watch?v=G6kI0rc ... ture=share

And then just emulate the trigger to play with the shot gun in Onward, or general FPS VR games?

Re: Vive controller emulation using an Xbox controller

Posted: Fri Feb 17, 2017 10:10 am
by Akshat012
I'm New, Can You tell me from start What to Do??

Re: Vive controller emulation using an Xbox controller

Posted: Sun Apr 02, 2017 11:37 pm
by konstantin_lozev
zelmon64 wrote:
konstantin_lozev wrote:That's an awesome idea for emulation. I was thinking of making a similar script with a similar approach, but with a standard gamepad. How did you finally tackle the problem of 2x6dof which is 12 axes vs the 4 axes available on the Xbox (and standard) controllers? I was thinking of assuming you always move the Vive/Hydra wands somewhere from your elbows, then you have only 4 dof in total to cover in most cases.
In my script the two analogue sticks default to x and y position of the Hydra controllers. When a bumper is held down the corresponding stick controls the yaw and pitch of the corresponding controller. The d-pad is set to change the roll and z position of a controller also when the corresponding bumper is held down.

It seems to work reasonably well and can easily be modified to use the generic `joystick` instead of `xbox360`. One interesting thing to note is that when in the SteamVR menu the real xbox controller input is detected as well as the emulated Vive controllers which can lead to unintentional things happening. I was going to use a DS4 controller instead to try to circumvent this behaviour but then found that the DS4 is also recognised by Steam. I can't find a way to turn off controller support in Steam (which I thought was rather ironic).
I got a working script, but I think something is not totally right with the hydra fake .dlls. For some reason the yaw is in the controller's coordinate space, whereas pitch and roll are basically rotations around the cardinal/world x and z axes. This leads to the following issue: when I input yaw at 90 degrees and then input pitch, the controller rolls instead of pitching. You should have the same issue with the xbox script. I made a crude workaround whereby I input a weighted pitch and roll depending on the yaw offset, but when inbetween, say yaw 45 degrees, it glitches out at slightly bigger angles (from observation, when pitch + roll > 90 degrees). It works as intended in the extremes, i.e. yaw 0 and yaw 90 degrees. I am looking for an easy and more reliable way to convert the pitch and roll into the controller's coordinate space. Conversely, I am looking into ways to have the yaw in world space, i.e. always around the y axis. I might need to go through some unconventional rotation matrices with all these conversions, but I really would prefer not to...

Re: Vive controller emulation using an Xbox controller

Posted: Mon Apr 03, 2017 2:05 am
by zelmon64
konstantin_lozev wrote: I got a working script, but I think something is not totally right with the hydra fake .dlls. For some reason the yaw is in the controller's coordinate space, whereas pitch and roll are basically rotations around the cardinal/world x and z axes. This leads to the following issue: when I input yaw at 90 degrees and then input pitch, the controller rolls instead of pitching. You should have the same issue with the xbox script. I made a crude workaround whereby I input a weighted pitch and roll depending on the yaw offset, but when inbetween, say yaw 45 degrees, it glitches out at slightly bigger angles (from observation, when pitch + roll > 90 degrees). It works as intended in the extremes, i.e. yaw 0 and yaw 90 degrees. I am looking for an easy and more reliable way to convert the pitch and roll into the controller's coordinate space. Conversely, I am looking into ways to have the yaw in world space, i.e. always around the y axis. I might need to go through some unconventional rotation matrices with all these conversions, but I really would prefer not to...
Hi konstantin_lozev,

Did you use the fake .dlls that come with FreePIE or the original ones CyberVillain posted (which I reposted here)? I think the key difference between these fake .dll versions was the way they handle the orientation (with the original ones handling it correctly for these circumstances).

Re: Vive controller emulation using an Xbox controller

Posted: Mon Apr 03, 2017 4:40 am
by konstantin_lozev
zelmon64 wrote:
konstantin_lozev wrote: I got a working script, but I think something is not totally right with the hydra fake .dlls. For some reason the yaw is in the controller's coordinate space, whereas pitch and roll are basically rotations around the cardinal/world x and z axes. This leads to the following issue: when I input yaw at 90 degrees and then input pitch, the controller rolls instead of pitching. You should have the same issue with the xbox script. I made a crude workaround whereby I input a weighted pitch and roll depending on the yaw offset, but when inbetween, say yaw 45 degrees, it glitches out at slightly bigger angles (from observation, when pitch + roll > 90 degrees). It works as intended in the extremes, i.e. yaw 0 and yaw 90 degrees. I am looking for an easy and more reliable way to convert the pitch and roll into the controller's coordinate space. Conversely, I am looking into ways to have the yaw in world space, i.e. always around the y axis. I might need to go through some unconventional rotation matrices with all these conversions, but I really would prefer not to...
Hi konstantin_lozev,

Did you use the fake .dlls that come with FreePIE or the original ones CyberVillain posted (which I reposted here)? I think the key difference between these fake .dll versions was the way they handle the orientation (with the original ones handling it correctly for these circumstances).
Hi, I think I copied yours, I don't even know where the bundled ones are in the FreePIE folder. Will recheck, though...

Re: Vive controller emulation using an Xbox controller

Posted: Wed Nov 15, 2017 7:40 am
by Quazerd
Sorry for necroposting, but is there any way to use steam controller instead of vive controllers? It's better then xboxpad, it have two trackpads, stick and gyro. Any possibility?
Trouble is that all this features work only when the game launching through steam and it take controller settings from steam. So it need launch the game through steam. Or it doesn't matter if this will be applied by driver? Is that driver can use gyro? And another question that I want to use it all through riftcat.
Is that theoretically can work?

Re: Vive controller emulation using an Xbox controller

Posted: Wed Nov 15, 2017 10:11 am
by zelmon64
Quazerd wrote:Sorry for necroposting, but is there any way to use steam controller instead of vive controllers? It's better then xboxpad, it have two trackpads, stick and gyro. Any possibility?
Trouble is that all this features work only when the game launching through steam and it take controller settings from steam. So it need launch the game through steam. Or it doesn't matter if this will be applied by driver? Is that driver can use gyro? And another question that I want to use it all through riftcat.
Is that theoretically can work?
For most of it you can use GloSC to make the SC output as XInput to be read by FreePIE. Then for the gyro try using steam-gyro-for-cemuhook to send the information via UPD which hopefully can be read by freeImu.

Using it with riftcat shouldn't be a problem. Just remember to enable the multiple drivers setting for SteamVR.

Re: Vive controller emulation using an Xbox controller

Posted: Thu Sep 06, 2018 12:35 am
by DannyDan1234
Hi Guys,

I know this thread is a bit old, but I'm trying to get this thing to work and followed all the steps, but I'm not able to get it to work. Any1 can list all steps step by step?
Thanks

Danny

Re: Vive controller emulation using an Xbox controller

Posted: Mon Sep 09, 2019 11:54 am
by marcob
DannyDan1234 wrote:Hi Guys,

I know this thread is a bit old, but I'm trying to get this thing to work and followed all the steps, but I'm not able to get it to work. Any1 can list all steps step by step?
Thanks

Danny
Hi Danny. We arw on the same boat. Have you managed to get any help around. Maybe we help each other and hopefully get help from others .?

Thanks