zeth / inputs

Cross-platform Python support for keyboards, mice and gamepads
BSD 3-Clause "New" or "Revised" License
269 stars 87 forks source link

analog stick coordinate reporting #74

Open Batcastle opened 5 years ago

Batcastle commented 5 years ago

So this entire issue is just trying to figure out how the coordinates for the analog sticks are reported. More specificity, what is the coordinate system? For instance, is the X- and Y-axis like this:

Y
|
|
|                 * - default orientation
|    origin
|  / 
------------------------------------- X

or are they like this:

                Y
                |   origin AND default orientation
                | / 
----------------*-------------------  X
                |
                |

also, knowing how far the X and Y axis go would be useful too. That way, a dev can convert from one of the above graphs to another with just some simple subtraction to both X and Y coordinates.

So, in a nutshell:

  1. What quadrants of the coordinate plane does this work with? Just one? Or all 4?
  2. How far do both axis go?
Avril112113 commented 4 years ago

1) For my XBox controller it dose go into the negatives, so origin and default are 0, 0 2) Im trying to figure this one out my self, I've seen for my XBox controller that it ranges between -32768 to 32767 With both of what I said, I think this may vary for each type of controller?