Overview
This will show you the variables used to help setup Half-Life with an axis input device.
Joystick (axis) use in Half-Life
Yes we all know first person shooters are better with a keyboard an mouse. Remember there are others in this world that may not be as fortunate as you and be able to use as such. This tutorial was written to help give a better understanding of how to assign axis control in Half-Life and can work for a multitude of input devices, not just joysticks.
I have been using a joystick to play FPS games since Duke Nukem and Redneck Rampage. Back in those days I used the hat switch to look up and down, but when newer games started supporting multiple devices at once such as Forsaken, Unreal, and Half-Life, I started using a trackball in conjunction with the joystick. With this setup I use the joystick to move forward, back, left, right, and strafing. I use the trackball for aiming all directions. I do not know why I prefer this setup; it is just what I have become very comfortable with. The thing is I am here to help you get the most out of axis assignment and tweaking.
The first thing you want to do is make sure the device you are using whether it be a normal joystick or a game pad with sticks is to make sure it is digital. Analog sticks tend to lose their calibration during game play.
Before we get started with the actual deed, let’s go over the assignable commands and variables.
These six variables control axis mapping:
Variable: Joyadvaxisx
Function: Controls mapping of DirectInput axis X (typically joystick left and right)
Default: 3
Comments: Allows the joystick to turn.
Variable: Joyadvaxisy
Function: Controls mapping of DirectInput axis Y (typically joystick forward and backward)
Default: 1
Comments: Allows the joystick to move forward and backward.
Variable: Joyadvaxisz
Function: Controls mapping of DirectInput axis Z (typically joystick throttle)
Default: 0
Comments: Not used.
Variable: Joyadvaxisr
Function: Controls mapping of DirectInput axis R (typically joystick rudder)
Default: 0
Comments: Not used.
Variable: Joyadvaxisu
Function: Controls mapping of DirectInput axis U (custom axis – Assassin 3D trackball left and right, WingMan Warrior SpinControl and SpaceOrb roll)
Default: 20
Comments: Sets the Assassin 3D to relative turning left and right. (Not self centering)
Variable: Joyadvaxisv
Function: Controls mapping of DirectInput axis V (custom axis – Assassin 3D trackball forward and backward and SpaceOrb yaw)
Default: 18
Comments: Sets the Assassin 3D to relative free-look up and down. (Not self centering)
To explain the default assignments you seen there, here is a description of each number.
0 = Axis not used
1 = Axis is for forward and backward movement
2 = Axis is for looking up and down (pitch)
3 = Axis is for side to side movement
4 = Axis is for turning left and right (yaw)
These variables control your sensitivity settings:
Variable: Joyforwardsensitivity
Function: Controls the ramp-up speed or how much joystick movement is required for moving “full speed” forward and backward
Default: -1.0
Comments: If your joystick is not as fast as you think it should be try a setting of -1.5, you will reach full speed with only half of the movement.
Variable: Joysidesensitivity
Function: Controls the ramp-up speed or how much joystick movement is required for moving “full speed” side to side
Default: 1.0
Comments: If your joystick is not as fast as you think it should be try a setting of 1.5, you will reach full speed with only half of the movement.
Variable: Joypitchsensitivity
Function: Controls the speed or ratio used when you look up and down.
Default: -0.25
Comments: This setting will allow you to look Up and Down at a 45 degree angle without repositioning your hand.
Variable: Joyyawsensitivity
Function: Controls the speed that or ratio used when you look left to right.
Default: -0.5
Comments: This setting will allow you to look left and right at a 90 degree angle without repositioning your hand.
You can set the sensitivity settings to negative numbers. This inverts the direction of movement for the control. The default sensitivity settings are 1 (or -1).
These variables control your threshold settings:
Variable: Joyforwardthreshold
Function: Controls the dead-zone for moving forward and backward
Default: 0.15
Comments: If you have problems with your character moving forward or back when trying to stop or strafe, increase this number to .20
Variable: Joysidethreshold
Function: Controls the dead-zone for moving side to side
Default: 0.15
Comments: If you have problems with your character moving left or right when trying to stop or walk a ledge, increase this number to .20
Variable: Joypitchthreshold
Function: Controls the dead-zone for looking up and down
Default: 0.15
Variable: Joyyawthreshold
Function: Controls the dead-zone for looking left and right
Default: 0.15
The threshold settings allow you to control your dead-zone (or no-movement zone). The default threshold settings are .15 (meaning 15% of the full-range). The range of the threshold settings is from 0 to 1. Troublesome analog joysticks may need a larger number (like .2). Premium joysticks can use a smaller number (like .1).
More of my tutorials can be found at [link]
Visuals
Y Axis
We are going to do assignments for a standard PC joystick being that is what I am most familiar with, but these can be applied to other controllers. Let’s take a look the Y or forward and backwards axis to begin with. In your userconfig.cfg file this would be assigned as “Joyadvaxisy 1” being that 1 represents forward and backward movement. The next line you can add to your file is “Joyforwardsensitivity -1.0”. This controls how far the stick is moved until it reaches full signal. If your joystick is not as fast as you think it should be try a setting of -1.5, you will reach full speed with only half of the movement. Taking the number the opposite direction would have the reverse effect. The final variable that can be used is “Joyforwardthreshold 0.15”. This controls the point at which the signal begins once the stick has started moving, also known as the dead-zone. Lowering this number will make the stick react quicker, increasing it will require farther movement before it works.
X Axis
Next we will work on assigning the X or left and right axis. The first command to ad to your userconfig.cfg is “Joyadvaxisx 4” being that 4 represents turning left and right (yaw). The next line will be “Joyyawsensitivity -0.5”. This setting will allow you to look left and right at a 90 degree angle without repositioning your hand. The final cvar for the yaw assignment will be “Joyyawthreshold 0.15”. This controls the point at which the signal begins once the stick has started moving, also known as the dead-zone. Lowering this number will make the stick react quicker, increasing it will require farther movement before it works.
R Axis
Now for or final axis assignment we are going to do is the R axis which we are going to use for strafing. Strafing is the sidestepping movement. The command to use for this is “Joyadvaxisr 3” being that 3 is used for side to side movement. The first cvar for this will be “Joysidesensitivity 1.0”. If your joystick is not as fast as you think it should be try a setting of 1.5, you will reach full speed with only half of the movement. The final cvar for the R axis is “Joysidethreshold 0.15”. This controls the point at which the signal begins once the stick has started moving, also known as the dead-zone. Lowering this number will make the stick react quicker, increasing it will require farther movement before it works. If you have problems with your character moving forward or back when trying to stop or strafe, increase this number to .20.
Now with all of this information, our userconfig.cfg file would have a section in it that looks like the following.
Remember to try changing the cvar values in small increments and play for a few minutes to take notice of the small differences in how your joystick responds.