Jump to content

Recommended Posts

Posted

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 :

 

image.png?ex=65691ebd&is=6556a9bd&hm=8b3

Posted

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

1569924735_WildcardsBadgerFAASig.jpg.dbb8c2a337e37c2bfb12855f86d70fd5.jpg

Posted
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?

Posted (edited)

I do this:

image.png

image.png

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 by speed-of-heat
  • Like 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

1569924735_WildcardsBadgerFAASig.jpg.dbb8c2a337e37c2bfb12855f86d70fd5.jpg

Posted

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?

Posted (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 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

1569924735_WildcardsBadgerFAASig.jpg.dbb8c2a337e37c2bfb12855f86d70fd5.jpg

Posted

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.

Posted

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

1569924735_WildcardsBadgerFAASig.jpg.dbb8c2a337e37c2bfb12855f86d70fd5.jpg

Posted

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.

Posted (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 by Morphine
Posted

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)

Posted (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 by Roger01
Posted

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

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...