Joy 2 Mouse

Image © Stanley Skarshaug

Image © Stanley Skarshaug

Piranha Games' MechWarrior5: Mercenaries and MechWarrior Online are underrated gems designed to give BattleTech fans their fix for stompy robot action. Unfortunately, the developers have not been able to implement proper joystick controls for any of their games. This made me put the task into my own hands.

In this article, I will provide an explanation of how things work in joy2mouse, and what the intended use for each function is.

The latest release of the program can be downloaded for free from the project's GitHub page.

Why do you need it?

You need absolute aim in mech' games!

MechWarrior Online, and MechWarrior5: mercenaries have support for analog control of the reticule, throttle, and turning of the mech. The throttle and turning controls work great, but the reticule control with joysticks controls uses relative controls. This is similar to how you would normally control your character in first-person shooters on consoles.

With relative aim, the reticule moves faster the further you push the joystick. In essence, this makes it really hard to precisely aim at targets that can move fast. In Mechwarrior games, you will have to be able to aim precisely, and many enemy targets like light mechs and tanks are fast, so it becomes really hard to aim well and have fun while playing the games with a joystick.

Absolute aim is a forgotten input method that stopped being supported around the same time as Steel Battalion on the original Xbox was released. In other words. A long time ago. Absolute-aim uses a joystick much like you would move a computer mouse. When you move the joystick, the reticule will follow the joystick position. When you hold the joystick in one spot, the reticule will not move. In my opinion, it's not possible to play tank games like MechWarrior Online and MechWarrior 5: Mercenaries without absolute aim.

To solve the issue, I have created a universal joystick-to-mouse translation program called joy2mouse that does not require Windows drivers or any installations. The program is lightweight and requires very little system resources to run.

Joy2mouse was designed specifically to work with MechWarrior 5, but it can be used for any other application where you want to precisely control mouse input with a joystick.

Translation methods

How joystick movement is translated to mouse movement.

Joy2mouse has several translation methods, each has its own use case and is optimized for several applications.

Absolute - From last mouse position, is a simple method of mouse translation that will move the mouse relative to where the mouse was when activated the program. This works really well within Windows and in games that precisely match reticule movement to mouse movement. In most first-person shooters this will be the preferred translation method because it is very precise.

This translation method does not work great in MechWarrior 5 because any mouse position outside the main monitor will not be registered in-game. It does however work fantastically with FPS games like Cyberpunk 2077.

Absolute - From center of screen, is a translation method that puts the mouse in the middle of the screen when activated. When moving the joystick the relative joystick position will move the mouse relative to each screen edge.

For ultra-precise aiming in MechWarrior 5, this is ideal, but you will have to play with sensitivity settings in-game to make it match the torso rotation and pitch angle of the mech.

Emulate mouse movement based on joystick position, is a translation method that calculates how much the joystick moved since it was last checked. It then calculates how much to move the mouse based on this reading.

This works the best for MechWarrior 5 in my experience. One thing to keep in mind is that when the maximum rotation of the mech is achieved the mouse will stick to that edge. This will change how the center position of the joystick will map to the in-game torso twist.

Autocenter

When the game reads mouse movement in a funky way...

In MechWarrior 5, the mouse aim is so imprecise that when the mouse (or joystick when using joy2mouse) is returned to the exact same position, the reticule in-game will not return to the exact same position. The "Autocenter" feature was added to fix this issue. This feature spams the key C-key (or the key you configured) to center the torso relative to the mech feet when the joystick is centered.

This feature is not really needed on a joystick that doesn't use springs and only uses damping grease and friction to stabilize the joystick. For those joysticks, I recommend binding a center torso button close to the center legs binding and using it when you feel the aim is getting too whacky.

Joystick and button box

The button and axis bindings are split into a joystick and button-box configuration to enable the use of one joystick to control the mouse, and another, like a button-box or throttle to activate and deactivate the mouse control. It is possible to use the same device as both the joystick and button box.

The joystick can be bound to control the mouse's x-axis (horizontal) and the mouse's y-axis (vertical).

How the axis is translated to mouse movement can be inverted. If the X-axis is inverted a left movement on the joystick will move the mouse to the right. If the Y axis is inverted an upward movement of the joystick moves the mouse downward.

The joystick can be bound to control the left and right mouse buttons.

Inverting any button input will activate the button when it is not activated on the joystick.

Activation

Joy2mouse can be activated with three methods.

Hold button, uses a physical flip switch that can be switched on or off. The program will be active when the flip switch is in the on position, and deactivate when the flip switch is in the off position.

When the activate input is inverted the program will activate when the flip switch is in the off position, and deactivate when the flip switch is in the off position.

Toggle button, uses a single push-button (pulse button) to activate and deactivate the program. One push activates, and another push deactivates.

When the activate input is inverted the button has to not give a signal to register as pressed. This is added just to support special case joysticks that have inverted inputs.

On/Off button, uses two push-buttons (pulse buttons) to activate and deactivate the program. The activate button, activates the program when it is pushed, and the deactivate button, deactivates the program when pushed.

When the deactivate input is inverted the button has to not give a signal to register as pressed. This is added just to support special case joysticks that have inverted inputs.

Arm / Disarm

Safety first

To prevent accidental activation during configuration and startup the program has to be armed before it can be activated. It's not possible to arm the program if the activated input is active, and it's not possible to arm the program if it's not fully configured.