Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Gamepad joysticks not centered at Zero

Author
Message
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 18th Jun 2016 20:04 Edited at: 18th Jun 2016 20:06
I'm using an SNES gamepad adapter, not an Xbox or Logitech gamepad.
Is it normal for some joysticks to not center at 0?

The author of this post has marked a post as an answer.

Go to answer

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 18th Jun 2016 20:41
if it is after calibrated i guess its a driver problem and agk just get this wrong values.
this should get values -1,0,1 for x or y axis in agk 2.0.19
do
print(GetJoystickX())
print(GetJoystickY())

sync()
loop
AGK (Steam) V2.0.19 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th Jun 2016 12:49
I think paul fixed this issue in an earlier build as I had this issue with one of my digital controllers. (They work on 0.0 - 2.0 I believe.)

If you haven't updated, try that. Or you could just subtract 1 from the axis values.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Jun 2016 13:11
This post has been marked by the post author as the answer.
I just checked and the range values were inverted for non-XInput devices, which might be confusing the gamepad into sending unsigned values. I've corrected the range values for the next version, hopefully that will fix it. I've attached a new version of the Windows interpreter if you want to test it, place it in "Tier 1\Compiler\interpreters"

Attachments

Login to view attachments
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 20th Jun 2016 13:16
Quote: " I've attached a new version of the Windows interpreter "
where?
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Jun 2016 13:17
Forgot to hit the upload button! It's there now
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 20th Jun 2016 22:37
That appears to have fixed it. Thanks Paul.

Login to post a reply

Server time is: 2024-11-17 09:11:37
Your offset time is: 2024-11-17 09:11:37