DiRT Rally
Mouse Steering solution
EDIT 24/6/17: The download link was removed. Steam does not tolerate Mega links, so I am hosting the file on Google Drive now.


Hey, I've been noticing the number of people asking for mouse steering, and so for a programming exercise I have created this small program.

Program features
1. Steering using mouse raw input (via a virtual joystick)
2. Border-less windowed mode
3. Mouse hiding
4. On-screen steering marker
5. Mouse buttons bindable in-game (via virtual joystick buttons)

It is made using Auto Hotkey and requires you to have vJoy installed.

The program uses a virtual joystick and feeds values to it.
When you move the mouse left and right the X value of the joystick will be changed.
If push back is set higher than 0, it will be pushed towards neutral over time.

Demo video by db_mew:
https://www.youtube.com/watch?v=cOkS19LQGQM&hd=1


Installation:
Diagram here: http://imgur.com/bQuR9Xj
1. Download and install vJoy[vjoystick.sourceforge.net]
2. Download my program[drive.google.com]

The program can be placed anywhere. It will save settings to Documents\Mouse Steering.


How to use:
The first time you run the program it will offer you settings. These will be explained below:

Sensitivity: Simply scales the input from your mouse. Too much and fine steering will be difficult. Too little and it will not be possible to reach full steering lock.

Push back: This is how strong the steering will push towards the neutral position. When set to 0 the value of steering will be maintained.

Non-linearity: This makes the steering much looser near the neutral position. Too much and it will feel very loose in the centre, too little and it will be difficult to separate fine and large movements.


When the program is running, you will notice a new icon in your tray. Right click and then click settings to open up the settings window.


Pressing CTRL + F11 shows a marker on the screen which moves in relation to the joystick position.
To work around the difficulty of displaying on top of a fullscreen DX application, I have added the ability to toggle border-less window, which allows the marker to be seen.

Left and right mouse buttons control buttons 7 and 8 on the joystick, for those who wish to use mouse buttons in game.

In V1.6.1 I've changed it so joystick values go from 0 to 32767 (as it should be) you may have to recalibrate or just reset to default. (default happens to be 32767)


Other information and hotkeys:
Its AutoHotkey, why not throw in a ton of utilities?
CTRL + F7: Change marker color
CTRL + F8: Toggle hide mouse
CTRL + F9: Toggle borderless window
CTRL + F10: Set joystick to neutral
CTRL + F11: Enable joystick marker (Doesn't currently work in fullscreen DX games, hence the existence of F8 and F9 hotkeys)
CTRL + F12: Exit

I'm not aware of a program that does this however I only did a brief Google search.

This program relies on:
vJoy by Shaul[vjoystick.sourceforge.net]
evilC's CvJoyInterface[github.com]
Gdip by tic[www.autohotkey.com]
AHKHID by TheGood[www.autohotkey.com]
Borderless window code by Klaus2[www.autohotkey.com]


Source code[pastebin.com]
Отредактировано Zoom377; 24 июн. 2017 г. в 7:13
< >
Сообщения 6175 из 77
I noticed that not every version of VJoy is working. I use Win8.1 and I tried other than the newest. I found working one downloaded from mediafire. I don't remember link but it is a version 2.1.8.

My work flow was different:
1. Install Vjoy.

2. Turn on MouseSteering 1.7.2 (F11 to turn on, F9 to full screen windowed, F7 - change color to green [optional]
my config: sensitivity: 10,7; pushback 0.01, non linearity default, is 1 I guess.

3. In game go to configuration menu.
In my game work also mouse&keyboard config. No need to use direct input config which was little annoying cause not saved changes I need to renew all the time. Click to change left or right steering and just wipe mouse on left or right side.
If not working try couple of time because it's not consistent. If it still not working that means that Vjoy not working properly and you have to try different version.

4. [optional] to config steering you can use that program http hwk.fi/vJoySteering/
type on google "vJoySteering"
But it also depend of working vJoy. If not working that program done nothing.

The same workflow works in WRC8. Just need to lower sensitivity to about 5-6. Value of 5.5 was the best. In option only for left steer need to chance invert axis.
Отредактировано Michal; 8 мар. 2021 г. в 10:36
Can this application select vJoy device #2? Is it possible? If yes, How can I edit?
my vjoy is not rendering my mouse its on 50 all the time can anybody help me?
when i move my mouse the axis is not moving at all i'm having difficulty with vjoy
Does not work in Dirt Rally 2.0
After the start, the wheels lock to one side.
Автор сообщения: WM
Does not work in Dirt Rally 2.0
After the start, the wheels lock to one side.

thats because you turn your mouse far left or far right. when the game starts, it thinks you turn hard left-right. try positioning your mouse cursor on center before you start the race. hope this helps. the program is fine. also it works on almost every racing game.
Отредактировано Speedfreak; 20 янв. 2022 г. в 10:56
Автор сообщения: Speedfreak
Автор сообщения: WM
Does not work in Dirt Rally 2.0
After the start, the wheels lock to one side.

thats because you turn your mouse far left or far right. when the game starts, it thinks you turn hard left-right. try positioning your mouse cursor on center before you start the race. hope this helps. the program is fine. also it works on almost every racing game.

https://www.youtube.com/watch?v=EnVx-tCUq4U

After trying to configure the control, I do not see the left LS or right LS as in the attached movie. I see the X axis or the inversion of the X axis. Any ideas?
Автор сообщения: WM
Автор сообщения: Speedfreak

thats because you turn your mouse far left or far right. when the game starts, it thinks you turn hard left-right. try positioning your mouse cursor on center before you start the race. hope this helps. the program is fine. also it works on almost every racing game.

https://www.youtube.com/watch?v=EnVx-tCUq4U

After trying to configure the control, I do not see the left LS or right LS as in the attached movie. I see the X axis or the inversion of the X axis. Any ideas?

idk about this, im not that expert. have you tried zoom377's program again?
hello, could you help me to implement this code of yours in my freepie script, to be exact it would be the maximum and minimum distance from the mouse and also the pushback, because I use this freepie script in several games, and I need these functions and the only person who found the functions in a program was yours. I have sent a friend request on steam. tks for attention, sorry for my english, is because im brazilian
if so I will leave my discord : Cachorrão#9551
Отредактировано GuiAlma.Eng; 1 фев. 2022 г. в 6:33
Could you also do the same for the Y axis so that one could also use the up and down movement as throttle and brake?
And, if possible, also please add the scroll wheel as an axis that can be used for throttle.
Отредактировано Pietrosz; 13 апр. 2022 г. в 14:08
Автор сообщения: Wojtec
Could you also do the same for the Y axis so that one could also use the up and down movement as throttle and brake?
Hey mate, i modified this script to have another axis for throttle based on Y movement of the mouse, and a third axis for brake which smoothly increases when spacebar is held. I find the mouse throttle takes some getting used to but it works great, and the spacebar axis has more utility than only having binary control over the brake, as you can more easily tap the key to keep the braking % at whatever level you desire. I did not modify the settings gui, so if you wish to change sensitivity, non-linearity and pushback of the throttle axis you will need to go to /My Documents/Mouse Steering/settings.ini and edit the settings manually.
Hold left click while on the throttle, release left click for the throttle to drop back down to zero. Also make sure to set brake deadzone and throttle deadzone to 20% as i have the baseline of the axis set to 20% of the way down.
Source code for the modified script: https://pastebin.com/q7EgpreT
Download for the compiled .exe: https://drive.google.com/drive/folders/15RLhCmm_Ll-H4DdZ4q8CG1wcD1DKF4KE?usp=sharing
My settings:
key_sensitivity=4.00000000000000000000
key_pushBack=0.01000000000000000021
key_a=1.00000000000000000000
key_sensitivityY=20
key_pushBackY=0.07000000000
key_aY=1.0

If anyone wants to use this and is having issues you can hit my discord at APE#7803.
Автор сообщения: APE
Автор сообщения: Wojtec
Could you also do the same for the Y axis so that one could also use the up and down movement as throttle and brake?
Hey mate, i modified this script to have another axis for throttle based on Y movement of the mouse, and a third axis for brake which smoothly increases when spacebar is held. I find the mouse throttle takes some getting used to but it works great, and the spacebar axis has more utility than only having binary control over the brake, as you can more easily tap the key to keep the braking % at whatever level you desire. I did not modify the settings gui, so if you wish to change sensitivity, non-linearity and pushback of the throttle axis you will need to go to /My Documents/Mouse Steering/settings.ini and edit the settings manually.
Hold left click while on the throttle, release left click for the throttle to drop back down to zero. Also make sure to set brake deadzone and throttle deadzone to 20% as i have the baseline of the axis set to 20% of the way down.
Source code for the modified script: https://pastebin.com/q7EgpreT
Download for the compiled .exe: https://drive.google.com/drive/folders/15RLhCmm_Ll-H4DdZ4q8CG1wcD1DKF4KE?usp=sharing
My settings:
key_sensitivity=4.00000000000000000000
key_pushBack=0.01000000000000000021
key_a=1.00000000000000000000
key_sensitivityY=20
key_pushBackY=0.07000000000
key_aY=1.0

If anyone wants to use this and is having issues you can hit my discord at APE#7803.

I have no clue why one would have to hold down LMB to activate the throttle. Just doesn't make sense to me. I thought of a axis like the one for x movements.
For some reason as soon as i'm using mouse steering using the AHK scripts, my game hard sutters every 5 seconds or less, making the game borderline unplayable, any solutions to this ? Tried various troubleshooting steps but it's diretly linked to using mouse steering or vjoy controls in game, as soon as i use a controller or wheel there's no stutters.

EDIT : Not vjoy's or AHK's fault, i find out it's actually a game issue, there's a fix on github.
Отредактировано Unregistered HyperCam 2; 6 авг. 2023 г. в 8:32
Hello i've been using this program for years, but now, it suddenly, from night to day, it stopped working and the axis doesn't work anymore, just the buttons. Any solutions?
< >
Сообщения 6175 из 77
Показывать на странице: 1530 50