• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Right analogue stick not responding as expected.

jswillis

Member
Hi all, this is my first post so aplogies if its in the wrong place.

I have a google stadia controller plugged into a windows laptop. All the buttons work fine as does the left analogue stick. The right analogue stick on the other hand performs a little weird.

-gp_axisrh returns right stick vertical instead of right stick horizontal.
-gp_axisrv returns nothing.

This is partly described in the bug that was fixed a couple of years ago https://bugs.yoyogames.com/view.php?id=28583 but still occurs.

I dont know if this is because of the way the right analogue stick is showing in windows Z Axis and Z Rotation. Image below.

I'm not keen on remapping anything in windows (and not tried) but was wondring if there was a way to make it work using Game Maker... or does it need to be raised as a bug.

If it helps, gamepad_is_connected() returns 4.... Any help or advice would be great. thanks

Stadia_input.JPG
 

kburkhart84

Firehammer Games
I somehow missed this one when it was originally made back in February. As far as the original post, I'm guessing the mapping isn't accurate(common with DInput devices, since there isn't an actual standard on what axis is what like with XInput, and I KNOW it is DInput because devices 0 - 3 are for XInput). I personally get around this problem by not using the gp_ constants for any of the inputs for devices that aren't XInput. This way I can access everything that is available, including the POV hats(that require different functions from buttons and axes). The axes may not be the same as far as the naming of them, but the functionality will always be there the same.

As far as the XBOX One X controller...I would think that would come up as an XInput device. What gamepad ID is it giving you @Kasper Bahrentz ?
 
@kburkhart84 It is giving me gamepad ID 4, just as with @jswillis , so it should be read as a Xinput device I think. If I test the input in Windows it seems to work fine, and I just bought it a couple of weeks ago so there should be no problem. I can only assume that the problem is with Gamemaker Studio 2. An interesting thing to note is that when I use gp_axisrh and gp_axisrv, Gamemaker not only (incorrectly) reads inputs from the right analog stick, but also seemingly correctly reads input from the analog triggers (RT and LT). Maybe the problem has something to do with that? If so, how would I go about remapping the inputs to be correct?
 

kburkhart84

Firehammer Games
@kburkhart84 It is giving me gamepad ID 4, just as with @jswillis , so it should be read as a Xinput device I think. If I test the input in Windows it seems to work fine, and I just bought it a couple of weeks ago so there should be no problem. I can only assume that the problem is with Gamemaker Studio 2. An interesting thing to note is that when I use gp_axisrh and gp_axisrv, Gamemaker not only (incorrectly) reads inputs from the right analog stick, but also seemingly correctly reads input from the analog triggers (RT and LT). Maybe the problem has something to do with that? If so, how would I go about remapping the inputs to be correct?
If it is coming up as ID 4, then you are reading it as a DInput device(the original poster has a Google Stadia thing so it made sense for them). The issue I see is that you seem to actually have an XInput device. These do typically work as both XInput AND DInput, but the DInput drivers are actually slightly gimped on purpose via Microsoft. Can you try to use it gamepad ID 0? If it is the only XInput device you have plugged in, it should automatically come up as ID 0.
 
@kburkhart84 That did it! Using gamepad ID 0 fixed the issue. I also found out why it happened. When i looped through all gamepads to check for a connection, I foolishly started my for-loop from 1 instead of 0, resulting in gamepad ID 0 not being found . And here I was ready to go out and get another controller, thank a ton for the help!
 

kburkhart84

Firehammer Games
@kburkhart84 That did it! Using gamepad ID 0 fixed the issue. I also found out why it happened. When i looped through all gamepads to check for a connection, I foolishly started my for-loop from 1 instead of 0, resulting in gamepad ID 0 not being found . And here I was ready to go out and get another controller, thank a ton for the help!
Glad you see it fixed. I do something similar in my input system, when it searches for inputs to assign to actions, it always does the XInput one first so that I never have this same issue.
 
Top