This module is about showing joysticks.
Get the joystick that usually resides on the left of the controller. This is considered the primary joystick on the controller.
Get the joystick that usually resides on the right of the controller. This is considered the secondary joystick on the controller.
If you suspect that your user might somehow have more than two joysticks, you can access them using the general [Gamepad#joysticks] function.
The joystick's value can be read in multiple ways that might suit your needs.
On a scale from 0 to 1, return how intensely the joystick is being pushed away from the center.
This should be zero when the user doesn't touch their joystick, but that's often not the case. Joysticks get less accurate as the controller grows old, so you should expect this value to be near-zero rather than precisely zero.
Starting from the top, get a direction in terms of degress, starting at 0 from the top and going to 360 clockwise.
Same as direction, except the value is now a number between 0 and 1.
Convert a joystick's direction to an x and y value. The coordinates are defined as is starting from the top left, so:
Both values go from -1 to 1, so (-1, -1) and (1, 1) are the top left and bottom right respectively.
A joystick is a representation of a stick that can move in all directions.