Could anyone help me set up the mouse as a virtual joystick?

I recently bought a steam controller, and would like to use it to play ED. However, it only allows 4 traditional axes because it uses Xinput. It does allow for a mouse function to be mapped though. The only problem is that there's no intutive way to set that up since the axis either can't reach its full potential or must be recentered every time I use it, especially if I were to map it to the gyro. This could be solved by turning the mouse into a virtual joystick (the controller has a mode in the mouse always starts in the center of the screen and , well, basically functions like a joystick), but I have no clue how to do that, even after googling it for hours.

Would anyone know how to do that? I'd really appreciate any help I can get.
 
On mobile so can't tell for sure but look for an app called vJoy wich allows all sorts of mouse/stick stuff to be mapped as a virtual joystick.
 
Ah, yeah, I know about that. I installed it and everything, but I can't get it to work for the life of me (mainly because I can't find the screen where I can configure the bindings - if it exists).
Edit: I'm currently looking into using FreePIE to turn the mouse into an input which can then be recognised by vjoy. It requires scripting though, and, well... I don't know anything about it or python :(
 
Last edited:
vJoy won't work on its own. You need something to drive it. FreePIE is an excellent choice.

I found a script via Google and tweaked it slightly. You can change the sensitivity by increasing sensX and/or sensY, and you can modify the speed of the centring with centreX and/or centreY. Higher values would return the virtual stick to the centre quicker after you stop moving the mouse. That would be good for FA off or SRV flight. Give it a try.
Code:
if starting:
	centreX = 0.5
	centreY = 0.5
	sensX = 100
	sensY = 100
	system.setThreadTiming(TimingTypes.HighresSystemTimer)
	system.threadExecutionInterval = 10
	x = 0
	y = 0

if mouse.deltaX:
	x += mouse.deltaX * sensX
	if abs(x) > vJoy[0].axisMax:
		x = vJoy[0].axisMax * x / abs(x)
else:
	x /= (1.0 + centreX)

if mouse.deltaY:
	y += mouse.deltaY * sensY
	if abs(y) > vJoy[0].axisMax:
		y = vJoy[0].axisMax * y / abs(y)
else:
	y /= (1.0 + centreY)

vJoy[0].x = x
vJoy[0].y = y

diagnostics.watch(vJoy[0].x)
diagnostics.watch(vJoy[0].y)
 
vJoy won't work on its own. You need something to drive it. FreePIE is an excellent choice.

I found a script via Google and tweaked it slightly. You can change the sensitivity by increasing sensX and/or sensY, and you can modify the speed of the centring with centreX and/or centreY. Higher values would return the virtual stick to the centre quicker after you stop moving the mouse. That would be good for FA off or SRV flight. Give it a try.
Hmm, even if that isn't the exact setup I want that has enough information for me to be able to create my own config. Thanks you!
 
Back
Top Bottom