From 3c2e5b81d7928c0245522e089f37d1340b069a8b Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 17 Mar 2021 21:06:34 -0700 Subject: [PATCH] add some clarification to gamepad input --- content/Input/_index.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/Input/_index.md b/content/Input/_index.md index 29f3a58..78b2548 100644 --- a/content/Input/_index.md +++ b/content/Input/_index.md @@ -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;