The Joystick Input Device driver was designed for the Microsoft Sidewinder joystick, which contains more controls than the standard joystick. Nevertheless, you can use this device driver for standard joysticks as well. The available settings include:
X, Y, Z : Choose one of these to specify which joystick direction drives the animation. (Standard joysticks provide X and Y axes only. The Sidewinder provides the Z axis when you twist the joystick.)
Throttle: On the Sidewinder, this is a slider next to the stick.
Scale: Scales the relative effect of the joystick action to the animation response. (Spinner Value: float, 0 to 999,999)
Flip: Flips the direction of the response.
Accumulate: When unchecked, the joystick position represents an absolute position, and you’re limited to the “rectangle” defined by the limits of the joystick. When the joystick returns to its rest position, the value generated returns to zero. When this is checked, the joystick represents a change in the current position. Moving the joystick forward (for example) can cause an object to start moving, and it will continue to move until you return the joystick to its rest position.
Point-of-View Hat (Left-Right, Up-Down) : The Sidewinder includes a mini joystick on the tip of the main joystick. Specify the direction this joystick controls the animation
1, 2, 3, 4: These options specify one of four buttons in the Sidewinder joystick. They work similarly to the Point-of-View Hat, except that each button increases a direction value only while pressed. When you release the button, the value returns to zero (centered).
Inc./Dec.: One of three options that are only available when one of the numbered joystick button options is chosen. This option (Increment/Decrement) means that the value is incremented when the button is down, and decremented when the button is up.
Inc.: When this is chosen, the value increments when the button is down, and stays at that value when the button is released.
Absolute: When this is chosen, the assigned parameters jumps to the value set in the Speed spinner when the button is down, and then jumps back to zero when the button is released. Use this for on/off animations, such as blinking lights.
Speed: Controls the rate at which the value changes when using either the Point-of-View Hat or the four buttons. When using a button option and the Absolute option, this specifies the value that’s output when the button is pressed. (Spinner Value: float, -999,999 to 999,999)
Provides controls that let you derive the direction of movement from a Rotation controller. These options are used primarily when you’re animating a first-person flythroughsuch as when you’re controlling a camera.
Note: The items in this area are only available when Accumulate is checked in the Joystick Axis area.
Controller: Click to assign a Rotation controller from which the direction will be derived. Typically, this would be the Rotation controller of the camera you’re moving.
Clear: Click to remove the assigned controller.
Direction X/Y/Z: Specifies the local axis that will be used as the direction. For a Free Camera, for example, this would be Z, because the camera points in the Z direction. However, if you had a car that pointed along its Y axis, you’d use Y.
Component X/Y/Z: Specifies the which edit binding to use. Match this to the Edit Binding button in the Device Bindings area. For example, if the Y Edit Binding button is selected, choose the Y Component option.
In this example, you set up the Joystick controller to move a Free Camera around on the XY plane. The Y movement of the joystick will affect the camera’s forward and backward movement, and the X movement of the joystick will rotate the camera. You’ll use Increment Based On Direction to allow the Y movement to be local to the camera rather than to the world.
The rotation of the camera about its world Z axis will be controlled by the X motion of the joystick. Next, you’ll set up the Position controllers of the camera to move the camera forward and back with the Y motion of the joystick.
The Y motion of the joystick will now affect both the X and Y positions of the camera.
If you tested the camera motion at this point, moving the joystick forward or backward along the Y would produce a diagonal motion because the Position tracks would receive equal amounts of X and Y values. Adding the Increment Based On Direction options will change this.
You’ll now repeat the same steps for the Y binding.
As you move the joystick in the Y direction, the camera moves forward or back. Moving the joystick in the X direction rotates the camera, but then, as you continue moving the joystick in the Y direction, the camera moves forward and back along its local axis.