It is currently Mon Jun 26, 2017 6:18 pm



Reply to topic  [ 45 posts ]  Go to page Previous  1, 2
 Vive controller emulation using an Xbox controller 
Author Message
One Eyed Hopeful

Joined: Thu Mar 14, 2013 2:00 am
Posts: 8
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?


Thu Dec 29, 2016 7:20 am
Profile
One Eyed Hopeful

Joined: Fri Feb 17, 2017 8:01 am
Posts: 1
I'm New, Can You tell me from start What to Do??


Fri Feb 17, 2017 10:10 am
Profile
Cross Eyed!

Joined: Fri Jul 04, 2014 1:43 am
Posts: 186
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...


Sun Apr 02, 2017 11:37 pm
Profile
Cross Eyed!
User avatar

Joined: Thu Apr 09, 2015 4:27 am
Posts: 107
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).


Mon Apr 03, 2017 2:05 am
Profile
Cross Eyed!

Joined: Fri Jul 04, 2014 1:43 am
Posts: 186
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...


Mon Apr 03, 2017 4:40 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 45 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.