GameMaker Check how many thumbsticks?

G

GrandFree

Guest
When I use gamepad_get_axis_count() it reports I have a total of 8 axis' for one of my controllers.

Only other way I've found is to check the gamepad description and determine from there manually how many thumbsticks there are, but this is the worst way.

Doesn't seem there's a perfect way to get the number of thumbsticks properly. Anyone know?
 
L

Lonewolff

Guest
Strange one.

Going by the manual it should report 2 (assuming it has two thumb sticks of course). Either that or 4 depending on if it counts x and y as two axes.

How many controllers do you have connected? And you are obviously passing a controller id to gamepad_get_axis_count(), right? The call should fail otherwise, but you never know. I have seen some funny things slip by GMS in the past.
 
G

GrandFree

Guest
Strange one.

Going by the manual it should report 2 (assuming it has two thumb sticks of course). Either that or 4 depending on if it counts x and y as two axes.

How many controllers do you have connected? And you are obviously passing a controller id to gamepad_get_axis_count(), right? The call should fail otherwise, but you never know. I have seen some funny things slip by GMS in the past.
Yes I'm passing the device ID. I've seen someone report that their Joy-Con outputted a value of 40 with this function.

Something definitely doesn't seem right here.
 
L

Lonewolff

Guest
Might be one to escalate to the YYG boys.

Be sure to include controller model and type. Give them as much info as they need to replicate. :)
 

NeoShade

Member
What type of controllers are you using? An axis on a controller can be more than just a thumbstick.
A thumbstick will report 2 axes each (x and y).
If you also have analogue triggers, where the shoulder button can be part-way pressed like on a PS3, PS4, Xbox 360 or Xbox One (or a myriad of PC and third party controllers), then this will also count as an axis.
Furthermore, some controllers have motion detection in them, and while I don't actually know if these can be accessed with gamemaker, it would make sense that they would also be listed as an axis.
 
G

GrandFree

Guest
What type of controllers are you using? An axis on a controller can be more than just a thumbstick.
A thumbstick will report 2 axes each (x and y).
If you also have analogue triggers, where the shoulder button can be part-way pressed like on a PS3, PS4, Xbox 360 or Xbox One (or a myriad of PC and third party controllers), then this will also count as an axis.
Furthermore, some controllers have motion detection in them, and while I don't actually know if these can be accessed with gamemaker, it would make sense that they would also be listed as an axis.
Honestly you'd think it would report two but it's throwing back 8. Another controller reports 14, and someone else reported when they connected their Joy-Con it showed 40.

Also I don't think the number of axis will help in this situation because there's not really a way to know how many sticks there are, which is what I want.

I'm using mostly XInput devices, however one I'm using that only has one stick is a DirectInput device.
 
Top