add some clarification to gamepad input
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
bfacdc8f95
commit
3c2e5b81d7
|
@ -77,9 +77,14 @@ if (Inputs.GamepadExists(0))
|
|||
|
||||
`GetGamepad` will throw if a gamepad is not connected so you should make sure to check `GamepadExists` before using it.
|
||||
|
||||
MoonWorks assumes your gamepad has a left stick, a right stick, and two triggers. The stick axes are represented in the range [-1f, 1f] and the trigger axes in the range [0f, 1f];
|
||||
MoonWorks assumes that your gamepad is laid out similarly to a standard Xbox 360 controller and that it has a left stick, a right stick, and two triggers.
|
||||
The stick axes are represented in the range [-1f, 1f] and the trigger axes in the range [0f, 1f].
|
||||
|
||||
The buttons correspond to the physical location of the buttons on an Xbox 360 controller.
|
||||
So on a DualShock 4 controller, for example, Moonworks would treat the Cross button as an A button input.
|
||||
|
||||
```cs
|
||||
var xButtonDown = gamepad.X.IsDown;
|
||||
var leftStickHorizontal = gamepad.LeftX;
|
||||
var rightStickVertical = gamepad.RightY;
|
||||
var leftTrigger = gamepad.LeftTrigger;
|
||||
|
|
Loading…
Reference in New Issue