Roger01 Posted November 16, 2023 Posted November 16, 2023 Hello! I'd like the (blue) crosshair on the mouse that you see in VR not to be in the centre of the screen but lower down (so that I don't have to tilt my head too much as I'm mainly looking down). Do you have any ideas on how this could be done? Thank you! Exemple :
speed-of-heat Posted November 16, 2023 Posted November 16, 2023 I use voice attack, to map a button press, to an x,y position for the mouse...which places it at the centre and below the middle of the screen... I them map the same button in dcs to LMB etc... And then my mouse magically appears at my point of gaze... SYSTEM SPECS: Hardware AMD 9800X3D, 64Gb RAM, 4090 FE, Virpil T50CM3 Throttle, WinWIng Orion 2 & F-16EX + MFG Crosswinds V2, Varjo Aero SOFTWARE: Microsoft Windows 11, VoiceAttack & VAICOM PRO YOUTUBE CHANNEL: @speed-of-heat
Roger01 Posted November 16, 2023 Author Posted November 16, 2023 (edited) Thanks, I try that tomorrow Like this? Edited November 17, 2023 by Roger01 1
A.F. Posted November 17, 2023 Posted November 17, 2023 vor 7 Stunden schrieb speed-of-heat: I use voice attack, to map a button press, to an x,y position for the mouse...which places it at the centre and below the middle of the screen... I them map the same button in dcs to LMB etc... And then my mouse magically appears at my point of gaze... Could you please describe this in more detail? What does LMB mean, for example?
speed-of-heat Posted November 17, 2023 Posted November 17, 2023 (edited) I do this: that way my mouse is always in the center but below the middle of my screen (based on a 2k monitor) as I turn my head the mouse pointer moves, so it is natural to use. i look and click... In DCS I map the same button as the appropriate click, that way i never have to take my hands of my HOTAS. and i can still click, mapping to a keyboard will work but is slightly clumsy for me to use, ands i have buttons free on my hotas. LMB = Left Mouse Buton etc... Edited November 17, 2023 by speed-of-heat 1 SYSTEM SPECS: Hardware AMD 9800X3D, 64Gb RAM, 4090 FE, Virpil T50CM3 Throttle, WinWIng Orion 2 & F-16EX + MFG Crosswinds V2, Varjo Aero SOFTWARE: Microsoft Windows 11, VoiceAttack & VAICOM PRO YOUTUBE CHANNEL: @speed-of-heat
Roger01 Posted November 17, 2023 Author Posted November 17, 2023 If I understand correctly, the mouse cursor is automatically repositioned to the centre of the screen anyway? And the cursor moves with each press of the buttons? So you can't aim properly, can you?
speed-of-heat Posted November 17, 2023 Posted November 17, 2023 (edited) you do not understand correctly... the exact opposite... the cursor is always in the center of the screen e.g. where you are looking... try and see... dont use the mouse at all , just use the buttons... i mean you can ... Edited November 17, 2023 by speed-of-heat SYSTEM SPECS: Hardware AMD 9800X3D, 64Gb RAM, 4090 FE, Virpil T50CM3 Throttle, WinWIng Orion 2 & F-16EX + MFG Crosswinds V2, Varjo Aero SOFTWARE: Microsoft Windows 11, VoiceAttack & VAICOM PRO YOUTUBE CHANNEL: @speed-of-heat
Roger01 Posted November 17, 2023 Author Posted November 17, 2023 Well, that doesn't work at all. The blue cursor remains in the centre. It only works for the mouse in Windows, for example, but not in DCS in VR.
speed-of-heat Posted November 17, 2023 Posted November 17, 2023 im using it in VR ... and have been for years SYSTEM SPECS: Hardware AMD 9800X3D, 64Gb RAM, 4090 FE, Virpil T50CM3 Throttle, WinWIng Orion 2 & F-16EX + MFG Crosswinds V2, Varjo Aero SOFTWARE: Microsoft Windows 11, VoiceAttack & VAICOM PRO YOUTUBE CHANNEL: @speed-of-heat
Roger01 Posted November 17, 2023 Author Posted November 17, 2023 Ok... You had to activate the "mouse" option in the DCS VR tab for it to work. So it works now but on the other hand, the cursor disappears after a few seconds, which isn't practical if you have to press again to make it appear hmm... but it's already better than having your head down all the way. Thanks.
Koziolek Posted November 17, 2023 Posted November 17, 2023 I use JoyToKey and you can set where exactly do you want the mouse to center. I have mine 10 deg below center
Roger01 Posted November 17, 2023 Author Posted November 17, 2023 I downloaded JoyToKey, but it's really obscure... how do you do it please? Thank you so much!
Morphine Posted November 17, 2023 Posted November 17, 2023 (edited) @Roger01 I understand what you are trying to do with the Head Tracked cursor in VR. I hope there is a solution as it would be more convenient to use. Edited November 18, 2023 by Morphine
Roger01 Posted November 18, 2023 Author Posted November 18, 2023 Thanks, I try with AutoHotKey but I can't use ""IF then KEYPRESS"" mouse :=0 loop { ^!m:: { if (mouse = 1) { mouse :=0 return } } DllCall("SetCursorPos", "int", 1280, "int", 600) mouse :=1 Sleep, 3000 } return I try to search how to IF = ^!m:: but I can't find (^!m:: = ctrl+alt+M pressed)
Roger01 Posted November 18, 2023 Author Posted November 18, 2023 (edited) I find the code on a website. Works perfectly. Press CTRL+ALT+M will set the mouse in 1280/600 each 3 sec. Press a 2nd time will stop the script (if you don't want to see the blue cross) #MaxThreadsPerHotkey 3 ^!m:: if CTRLALTM ; This means an underlying thread is already running the loop below. { CTRLALTM := false ; Signal that thread's loop to stop. return ; End this thread so that the one underneath will resume and see the change made by the line above. } CTRLALTM := true Loop { DllCall("SetCursorPos", "int", 1280, "int", 640) Sleep, 3000 DllCall("SetCursorPos", "int", 1280, "int", 639) Sleep, 3000 if not CTRLALTM ; The user signaled the loop to stop by pressing Win-Z again. break ; Break out of this loop. } CTRLALTM := false return #MaxThreadsPerHotkey 1 Edited November 18, 2023 by Roger01
Tetra Posted November 19, 2023 Posted November 19, 2023 Personally use this JoystickGremlin plugin I found a script for somewhere on the net (can't remember where to credit the original poster sadly). Just modified it slightly to recenter the mouse just below center. Save it as a python file (*.py) and load it into JoystickGremlin user plugin section and bind a hotas button to recenter. import gremlin from gremlin.user_plugin import * def centerMouse(): import ctypes import win32api import win32con user32 = ctypes.windll.user32 # Get the screen resolution screen_width = user32.GetSystemMetrics(win32con.SM_CXSCREEN) screen_height = user32.GetSystemMetrics(win32con.SM_CYSCREEN) # Calculate the center position center_x = screen_width // 2 center_y = screen_height // 2 # Set the cursor position to the center then add offset to lower it (+47 is just below eye center) win32api.SetCursorPos((center_x, center_y + 47)) print("Event executed!") mode = ModeVariable( "Mode", "The mode to use for this mapping" ) btn_1 = PhysicalInputVariable( "Button", "hit the button", [gremlin.common.InputType.JoystickButton] ) state = [0, 0] decorator_1 = btn_1.create_decorator(mode.value) @decorator_1.button(btn_1.input_id) def button_1(event): state[1] = 1 if event.is_pressed else 0 centerMouse() # Call the centerMouse function here My Mods: Radar Warning Receiver Audio Expansion G-Breath Sound Mod
Recommended Posts