GetGamepadLeftStickX

From ESOUI Wiki

Jump to: navigation, search

This function returns the X-position of the gamepad's left stick, along the range of -1 (left) to 1 (right).

The returned value may be subject to both hardware variation and floating-point imprecision, and this may further be affected by whether you choose to include the deadzone. It may not be possible for the joystick to reach -1 or 1; when excluding the deadzone, mine tends to max out at magnitudes around 0.999.

Arguments

includeDeadzone
If this boolean is true, then the deadzone will be included in the stick range. If this argument is false, then the deadzone will be excluded: the value 0 will represent the outer range of the deadzone rather than the perfect center of the stick.

Example

if GetGamepadLeftStickX(false) > 0.9 then
   d("You sure do have that left stick pushed far to the right, huh?")
end

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox