Option to make mouse cursor stick to the center of the screen
-
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.
-
@Sneakpeek said in Option to make mouse cursor stick to the center of the screen:
@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!
SPOkay - a bit of a small update: Should be finished by end of weekend. Have just a few more āfunā things to do, but needed to double-verify that this works cuz my VR is put up in a box, and when I fire up BMS without VR, mouse centering doesnāt work (with my old console app, or my new hotness pictured above). Iāll just take it on faith that it works as you said for when in VR.
Yes, absolutely would need to turn off the Cursor Anchor setting. I will make sure that is prominent in instructions/download page when finished. It now has access to shared memory and the cursor will not center when not flying, though that is as fine control as I can give it and canāt tell if in other view modes where we might want mouse control instead like outside the cockpit, and such. I made it possible to target any process, too, so ofc the shared mem only works when Falcon BMS is the target - this will extend the life of this little utility for anyone who needs it down the road for VR applications or other purposes, in addition to the mouse scroll wheel keypress rebind.
This way, when BMS has native mouse centering option for VR one day, the app can still serve some purposes if not only in BMS, but wherever.
Anyway, back to it ā¦ Just wanted to share that update. Having fun learning how to make WPF apps and will likely never make a Windows Form app ever again now
-
@SemlerPDX if it helps, your utility doesnāt do anything to my mouse in VR either.