Main > Lightguns
VR lighthouse based tracking for lightguns
<< < (3/11) > >>
Toasty833:

--- Quote from: greymatr on April 22, 2024, 07:21:22 am ---So what do you mean to use OpenVR2Key to work with, is that to use with Virtual Desktop?

--- End quote ---
Yeah, VD gives me a left click trigger but for some reason I can't get use it to bind any of the other buttons with a vive controller, with an index one I can bind buttons to right click but I guess the guy developing it broke vive support at some point (or it never had any) and nobody ever noticed. It's not a big issue because OpenVR2Key lets me bind VR buttons to keypresses.


--- Quote from: greymatr on April 22, 2024, 07:21:22 am ---I'm trying to think what would give the best setup for you. I'd be happy to help where I can with programming or testing. If you want to let me know what problems you are having at the moment with it?

I can understand the hesitancy with using Vive Mouse, it gave the best results for me with how far I got with the vive but it's a closed sourced program, if it could be modified it would be a lot better.

--- End quote ---
Yeah, maybe you're right. Static calibration is fairly appealing, the problem is just everything else about the program is a bit half-baked and harder to get working than VD. I guess I could use OpenVR2Key and then something else to bind to mouse clicks. I'd also need to work out how to block Vive Mouse from receiving/sending keypresses like you did, seems like I need VS for the right dlls. Then I need to try and get AHK to intercept left clicks and turn them into right clicks if I'm clicking on the very edge of the screen for off-screen reloads. I also realised that vive mouse releases control of the mouse if you point it far enough off-screen, so I don't have to worry about wasting a button on it.
greymatr:

--- Quote from: Toasty833 on April 22, 2024, 03:55:17 pm ---Yeah, maybe you're right. Static calibration is fairly appealing, the problem is just everything else about the program is a bit half-baked and harder to get working than VD. I guess I could use OpenVR2Key and then something else to bind to mouse clicks. I'd also need to work out how to block Vive Mouse from receiving/sending keypresses like you did, seems like I need VS for the right dlls. Then I need to try and get AHK to intercept left clicks and turn them into right clicks if I'm clicking on the very edge of the screen for off-screen reloads. I also realised that vive mouse releases control of the mouse if you point it far enough off-screen, so I don't have to worry about wasting a button on it.

--- End quote ---

Can I ask what game or emulator you are trying to get working that uses right click for off screen reload? Most games I've seen use the same left click for firing and reload so it seems a bit odd. Maybe I could try it out.

I think using the Inject DLL code I have it would also be able to not just turn off the clicks from Vive Mouse but also intercept them and resend them. It is probably also possible to get the x,y mouse co-ords and then change whether it is left or right click. That should also remove the need for the python code.

If you have any problems compiling the Inject DLL code let me know
Toasty833:

--- Quote from: greymatr on April 23, 2024, 07:58:29 am ---Can I ask what game or emulator you are trying to get working that uses right click for off screen reload?

--- End quote ---
Basically every game works with it. The number of games that don't have an off-screen function is less common, and right click is the standard, basically every gun I've seen sends a right click instead of left click if you click outside of screen boundaries. Only titles like Time Crisis that use a pedal instead don't really have off-screen support. The few titles I've tried so far with just a left click gun would just fire at the edge of the screen if I tried to off-screen reload, but maybe there are a few that see "is gun at border? Then reload" rather than relying on the gun to say "I can't see the screen, send right click instead".


--- Quote from: greymatr on April 23, 2024, 07:58:29 am ---I think using the Inject DLL code I have it would also be able to not just turn off the clicks from Vive Mouse but also intercept them and resend them. It is probably also possible to get the x,y mouse co-ords and then change whether it is left or right click. That should also remove the need for the python code.

--- End quote ---
If something like that is possible it should be pretty useful.


--- Quote from: greymatr on April 23, 2024, 07:58:29 am ---If you have any problems compiling the Inject DLL code let me know

--- End quote ---
I used the pre-compiled version in the debug folders and it worked fine for disabling the vive buttons, with the exception of the menu button that still disables the cursor but that isn't really a big issue and I'm guessing it's hardcoded in vive mouse rather than something that's passed through and can be intercepted. With trigger, grip and trackpad that's still 3 usable buttons I can remap through OpenVR2Key because SteamVR still sees them fine.
greymatr:

--- Quote from: Toasty833 on April 23, 2024, 08:26:39 am ---Basically every game works with it. The number of games that don't have an off-screen function is less common, and right click is the standard

--- End quote ---
I had no idea this is how they worked, I thought it was all up to the game to know when it was off screen. Well I certainly learned something and the guns are smarter than I thought!


--- Quote from: Toasty833 on April 23, 2024, 08:26:39 am ---With trigger, grip and trackpad that's still 3 usable buttons I can remap through OpenVR2Key because SteamVR still sees them fine.

--- End quote ---
So I had a look at OpenVR2Key, I hadn't seen it before and I didn't realise it was open source. I setup my vive controller but thought I was going to have an issue as you said it needed an Index controller to map and he mentions that's what he has.

But I found he did try to support Vive at one point but the releases page is a very old build. So I compiled the code and was surprised to see it was working now.

I dug around a bit in the code and figured I could probably make mouse clicks work but would need to hijack some keyboard keys to test it quickly and not bother with the user interface side of that.

So I've mapped F1 to left mouse, F2 to right mouse and F3 to middle mouse.

I'm attaching my build of the exe and the source code.
Toasty833:

--- Quote from: greymatr on April 23, 2024, 01:10:07 pm ---So I had a look at OpenVR2Key, I hadn't seen it before and I didn't realise it was open source. I setup my vive controller but thought I was going to have an issue as you said it needed an Index controller to map and he mentions that's what he has.

--- End quote ---
Ah, maybe I didn't make it clear, I was talking about Virtual Desktop when it came to remapping, it has a bindings page. OpenVR2Key works fine with my Vive controller/tracker even on the newest release.


--- Quote from: greymatr on April 23, 2024, 01:10:07 pm ---I dug around a bit in the code and figured I could probably make mouse clicks work but would need to hijack some keyboard keys to test it quickly and not bother with the user interface side of that.

So I've mapped F1 to left mouse, F2 to right mouse and F3 to middle mouse.

I'm attaching my build of the exe and the source code.

--- End quote ---
But this is pretty handy anyway. The only issue is there's no repeating function which I think is a limitation of the program to begin with, if you hold a button down it only sends the input once, which means it's not very useful for games with machine guns. I found that by adjusting the click detection threshold to 1 (might not be necessary) and the dragging threshold to 10 in the Vive Mouse config, the trigger is a lot more responsive, there's no weird delay. You could probably go even lower than 10ms, I think the code just waits for whatever the dragging threshold is before it actually sends a click which is why it's so slow by default.


The other day I had demulshooter running with VD, but now I can't figure out how to get it to respond to clicks with vive mouse or VD anymore. Might have to restart and see if that fixes it, maybe the blocker stuff for vive mouse affected VD somehow, it might use user32 too to send fake mouse inputs to games. In testing I also think VD just responds better than vive mouse. Virtual Desktop is right in line, there's very little delay between moving the gun and the mouse following. With vive mouse it's like there's maybe a 50-100ms latency, if I waggle it back and forth I can see it lagging behind. I have stabilization in the config set to off and the average set to 1 in case that applies anyway, but it doesn't seem to make an impact. If it were possible to get Virtual Desktop to remember the last window position to essentially save the calibration, it'd just be superior.
Navigation
Message Index
Next page
Previous page

Go to full version