Option to make mouse cursor stick to the center of the screen
-
I could be wrong, but as I read the request it is for the mouse cursor to stay in the center of the view, even as the player pans the view by moving the head. So that whatever is looked at can be clicked
-
@jayb (presumably it would stay in center, unless you bumped it
I suppose one can manually move the mouse, to align on top of HMCS crosshair…
At that point, I’m sure there’s some configurable AutoHotkey script out there that will generate left/right mouse clicks, from joystick button presses.
-
Still going by what I think the request is
The HMCS turns off in-pit, so it would be for your point-of-view to function as the PointCtrl VR pointer tool. Effectively not having the need for PointCtrl with VR headsets.
Ex: Zoom in and look at Right MFD button 6, press click using some mapping from left mouse to a HOTAS button. Look down-right to the RADALT switch, click it. And so on.
-
I just made this option for U1…but needs some more test
-
My neck hurt at the mere thought of this concept… but I’m sure some people would find it useful. I also have some moderate scarring between T1 and C1, so I’m no measure of a target users of this kinda feature.
That being said, programmatically it is one of the more simple things that could be done. There are a number of ways this could be improved, but wanted to try it out and see if it would work well enough. I whipped up a bog-standard console application that will keep the mouse centered when the BMS program is in focus if you wanna try out this concept right away @Sneakpeek
__
Here is a copy of this console application pre-compiled and ready to run for the Falcon BMS process: https://www.dropbox.com/…/MouseCenteringUtility-BMS.zip
# Mouse Centering Utility # by SemlerPDX Jan2022 # https://github.com/SemlerPDX/MouseCenteringUtility This is a very simple mouse centering console application which forces the mouse to remain centered when the Falcon BMS process is in focus. When this utility program is running, and BMS is in focus, the mouse cannot be moved from center - use ALT+TAB to switch to this console app to close it. Being so simple, this can easily be improved upon, but can serve a purpose to test and explore the concept of a forced centered mouse using Falcon BMS in VR. USE: 1. Start Falcon BMS and get into the cockpit of a mission 2. When ready for a locked/centered mouse, run "MouseCenteringUtility.exe" 3. When you return to Falcon BMS, the mouse will be locked 4. ALT+TAB to this console app and close it to disable mouse centering
__
And here is a link to the GitHub repository if someone would rather pull & compile it for themself, or review/improve upon my code - be sure to follow instructions in the readme: https://github.com/SemlerPDX/MouseCenteringUtility
-
@jayb Yeah, you nailed it! That’s exactly what I mean.
PointCtrl is a bit more comfortable, as you can interact with most controls in your peripheral view without having to exactly look at it. That’s a lot better for your neck.
But if you need a low cost way to interact with the pit, my proposal might be worth a try.
@chihirobelmo Thanks a lot! That’s great news. Really cool, that you guys listen to the community!
BTW in DCS it’s this Option here (just as a reference):@SemlerPDX Great (except for the part about your neck. Hope it gets better over time)! Thanks for the code. I’ll have a look at it tomorrow. I would have tried it with Java (java.awt.Robot to the rescue), but it’s always a hassle to ship the whole runtime along with the tiny program.
Cheers,
SPEdit: I mean the “Use mouse” option on the screenshot…
-
@Sneakpeek I used a .NET Core console application with a target framework of .NET 5.0 for maximum compatibility with other systems, and can run on Windows, Linux, or macOS. Can definitely be improved upon, but I commonly whip up little utilities like this in C# using Visual Studio because it’s simple, fast, and a small package - this one has just 4 files in addition to the .exe and I didn’t bother with an icon or any dross.
Bog-standard concept tester, might even actually work until U1/U2 implementation of a proper system but no doubt could use some QoL improvements at the very least. -
@jayb basically the same as the dcs “don’t use mouse” option. DCS version, when you untick use mouse for Vr, is a small blue cross in the centre of your view.
But, it doesnt need to be tied to pointctrl or such like, it’s really intuitive when paired with hotas binds for left and right click.
That way, look at switch, press hotas button. Done.
-
@SemlerPDX I love little one-file C# apps like this.
I opened a few issues, for suggestions.
https://github.com/SemlerPDX/MouseCenteringUtility/issues -
@Sneakpeek said in Option to make mouse cursor stick to the center of the screen:
@jayb Yeah, you nailed it! That’s exactly what I mean.
PointCtrl is a bit more comfortable, as you can interact with most controls in your peripheral view without having to exactly look at it. That’s a lot better for your neck.
Cheers,
SPI see your point, not having to turn your head 1:1 towards what you would like to click is more comfortable. So PointCtrl still holds an advantage in that respect.
A neck-saving variation could be to look at, say, the right MFD with cursor initially dead-center of viewport. Let’s assume that the dead-center is exactly mid-screen for the MFD and we want to press a button on the MFD. That would be a bit off-center (unless we move the head and thereby the cursor). Then for finer movement of the cursor away from mid-screen to the button, one could use the radar cursor on HOTAS (possibly in a shifted state).
That way the cursor could be moved anywhere within the current view, ie. contact any peripheral object.
-
@Sneakpeek Is there a left hand version?? I’ve been looking at these before, just never pulled the trigger because don’t know how they perform. Do you still need a mouse pad/surface for it to work on?
-
we need to focus on fixes for U1 and this feature can be pushed for U2 or later.
-
@jayb There’s already an app called VR Necksafer which works with DCS and IL2: https://gitlab.com/NobiWan/vrnecksafer. It’s not compatible with BMS yet. Maybe if someone suggests it to the developer.
@chihirobelmo No prob. Fixes go first. I fully understand that - especially as there is a way to fix this by third party software.
@spotdott I tried to find a left-hand-version, but I couldn’t find one. But it might work for you anyway - you’d have to try.
If you use it on your right hand, you put it on your index finger and press the buttons with your thumb. This should also be possible with your left hand, too. The downsides are, that the left and right mouse buttons would be swapped and the IR sensor would be facing towards you. The IR sensor is meant for moving the mouse cursor around by holding it close to a surface and moving it around. Even clothes do suffice in that case. But this whole thread is about moving the mouse cursor with your head (by centering it on the screen). That way you wouldn’t need the IR sensor anyway. Without a way of centering the mouse cursor on the screen, the index finger mouse isn’t doing much good for our cause. In that case, I’d rather use a trackball. -
@SemlerPDX It works quite good. Thanks again for your work.
My thoughts about this:
- The “hitboxes” of the controls might have to be enlarged for this (or for PointCtrl for that matter) to be more comfortably.
- I had to set my Window Mode to fullscreen (because I have two monitors and the cursor position is derived from the active BMS window.
- I had to set
g_b3DClickableCursorAnchored
to0
for this to work. When snapping to the nearest control, the cursor just stays there until it disappears again. - It doesn’t really work in 2D. Maybe you could make use of BMS Shared Memory (there’s a flag that tells you if you’re In Flight or not. But it’s just OK now, if you don’t wanna put in more effort.
Cheers!
SP -
@Sneakpeek Well, since we just got confirmation that it will be awhile before something like this is implemented into BMS natively, I’m happy to take suggestions and fixes and improve this little utility for standard use & general public distribution.
I’ll post up here once I’ve committed these and other QoL changes to the main branch on GitHub - will try to have a proper functioning app completed by next week.
-
I have a little mouse that looks like a pointctrl device - it wraps around a finger, worn a bit like a ring, has left and right clicks on it. It was about £5 off Amazon. I think this might be a good budget pointctrl in combo with Semler’s “hack”. Will report back.
-
@rubbra Hi Rubbra, please check the first post of this thread. There’s a link to Amazon. Do you mean this device?
-
@Sneakpeek no, not that (I’d already seen it, having read the whole thread).
Thumbs Up Wireless Gyro Finger… https://www.amazon.co.uk/dp/B0937J99Z9?ref=ppx_pop_mob_ap_share
-
I’m abandoning the console app as an excuse to get into WPF App framework… I’ve done a lot with Windows Forms before, but WPF is the new hotness that all the kids are raging about. So, I’ve been going back and forth between Visual Studio and Photoshop to make a fancy looking jet-themed GUI panel for this ultra simple utility tool that will really only be useful for the few weeks (months?) before a mouse centering option is integrated into BMS through U1 or U2 this year.
Still, I’m having fun, learning a lot, and had always needed such an excuse to dive into this WPF stuff… it will have an auto-updater through GitHub or NuGet, which will just run when the app starts up, and user options for Auto, Manual (a pop-up window with url links), or None. Manual will be the default. Like before, users will be able to download a compiled version that works, or to grab it off GitHub and compile it for themselves.
I’ll include a remapper for setting any joystick button as a Mouse Left Button, and for mouse scroll wheel so up/down can be set to keystrokes. The metal bar along the bottom expands/collapses the user options section in this tiny app.
WIP & subject to change … but it’s shaping up nicely
The screw in the top right is the close button
…and with the options expanded:
TLDNR; I should have the first public version available before next week at the latest, but I’m shooting for end of week. I’d like to see if I can get it to watch the BMS Shared Memory so it only locks the mouse when we’re not in menus or 2D cockpit view or other such states - I assume the 3D Pan Cockpit mode would be the only place we’d want the mouse lock to engage. Honestly, if I can just get the updater in place, I can add or refine it later, and users can enjoy the basic functionality of a mouse lock with this new GUI as I add the remapper and other QoL improvements in the coming days/weeks.
-
Even without Semler’s utility, getting the HMCS aligned, then leaving the mouse cursor in the centre of the HMCS cross allows for good head control of clicks.
I just use joystick gremlin to remap HOTAS buttons to left and right click as per the image below.